-
Notifications
You must be signed in to change notification settings - Fork 342
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
replace storer transactions with leveldb batches #4341
Comments
The localstore should ideally looks like this. The localstore exports core, parent functions like Reserve.Put. Any two independent parallel writes to the same resource must be mutex locked as a means of data race protection. The transaction is internally a leveldb.Batch and exposes the storage calls Any write ops are accumulated in the batch of the transaction. Any sharky writes are immediately written to disk. Here is a summary of the order of operations: |
wrapSync should be removed with a multex in chunkstore ( see storer/reserve.go for what is a multex) |
more discussions are needed between bee team engineers to proceed with this. |
the chunkstore operations do not currently accept the leveldb batches for writes.
this can cause issues especially in areas of the localstore where the chunkstore is used in tandem with other stores that does indeed utilizes batches for write (eg reserve.Put).
the chunkstore transaction implementation is too complex and bug prone.
transactions for sharky especially is not needed, if a db operation fails, the written data and used slot can simply remain as is and do not need to be recovered.
we have
compact
cmd now which can give the used sharky space back to the node.also the
reverseOP
transaction idea for the indexstore should ideally be completely dropped and all writes must be done using the 'leveldb.batch`.The text was updated successfully, but these errors were encountered: