Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(localstore): leveldb-batch based transactions for both index and chunkstore for every localstore op #4561

Closed
wants to merge 21 commits into from

Conversation

istae
Copy link
Member

@istae istae commented Jan 30, 2024

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

An extensive cleanup of the db transaction.
Every localstore write operation now utilizes a transaction. Calls to the chunkstore are also part of the transaction.

also tackled: evict just enough chunks of a batch to fall below the reserve capacity

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

closes #4341 #4538

Screenshots (if appropriate):

pkg/node/node.go Outdated
@@ -184,8 +184,8 @@ const (
minPaymentThreshold = 2 * refreshRate // minimal accepted payment threshold of full nodes
maxPaymentThreshold = 24 * refreshRate // maximal accepted payment threshold of full nodes
mainnetNetworkID = uint64(1) //
ReserveCapacity = 4_194_304 // 2^22 chunks
reserveWakeUpDuration = 30 * time.Minute // time to wait before waking up reserveWorker
ReserveCapacity = 16384 // 2^14 chunks
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: remove before merge to master

@istae istae force-pushed the localstore-cleanup branch 5 times, most recently from 7b034fe to 174c1aa Compare February 8, 2024 19:52
@istae istae force-pushed the localstore-cleanup branch from 65bb262 to 849c9b2 Compare February 14, 2024 00:29
@istae istae closed this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant