Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Ensure that db ops are really transactional #113

Closed
rklaehn opened this issue Oct 25, 2022 · 2 comments
Closed

Ensure that db ops are really transactional #113

rklaehn opened this issue Oct 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Oct 25, 2022

Currently I think this is not the case, and we are just getting lucky. E.g. ensure_id_many creates its own WriteBatch instead of using the one from the caller.

@rklaehn
Copy link
Contributor Author

rklaehn commented Oct 26, 2022

I think we should do that after camp. It is not that easy. You have to open an entirely different database for it.

See https://github.com/facebook/rocksdb/wiki/Transactions. We might want to go with OptimisticTransactionDB.

If we want to be sure things are solid I would just wrap the DB in a reader-writer lock and leave the rest of the code as is.

@rklaehn rklaehn added the bug Something isn't working label Nov 2, 2022
@rklaehn
Copy link
Contributor Author

rklaehn commented Nov 2, 2022

Duplicate of #93

@rklaehn rklaehn closed this as completed Nov 2, 2022
@dignifiedquire dignifiedquire transferred this issue from n0-computer/iroh Feb 17, 2023
@ramfox ramfox removed this from iroh Feb 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant