-
Notifications
You must be signed in to change notification settings - Fork 704
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
TxnDB : Transactions via rocksdb_transaction_t #144
Comments
Looks like this has been there for a while. Just thought I'll drop a quick to see if there's any update on this? I'm holding off using rocksdb for some rust services due to transactions. |
Is this satisfied by #250? |
I think so. Looking forward to it getting merged :) |
I reread @rrichardson earlier comments and I think this issue is referring to the "pessimistic" version of transactional RocksDB, whereas #250 is adding the "optimistic" version. I think we should be able to land both, leveraging much of the work in #250. I'm currently working on some internal restructuring in #268 that will make it easier to implement both |
There are some missing methods in C API to make |
@hnakamur submitted facebook/rocksdb#5077 to add the missing APIs. Once they become available in a release, I'll work on adding support for it here in the Rust binding. |
@iSynaptic Can you please revisit current PR? |
Transaction functionality is exposed in rocksdb via a parallel implementation of the
rocksdb_t
calledrocksdb_transaction_t
. Now that we have bindgen (#143) we get access to it for "free".First, for brevity, I propose a new acronym that is the RocksDB parallel of CRUD, I call it
PIGMED , that's Put Iterate MErge Delete. Not catchy, I know.
The question is how to best expose the Transaction functionality while :
There are quite a few new methods for TxnDb that would need to be wrapped, some of them might make sense as guards or even closures.
I don't think there is a way to unify the PIGMED operations of DB and TxnDB while retaining type safety or even ergonomics. But there isn't actually a ton of PIGMED functionality in DB.
I propose we move all of the utility/environment functionality, that is anything that doesn't require a
rocksdb_t
into a separate utility module or modules (e.g.rocksdb::cf::create
forrocksdb_create_cf
)We then slim down DB to just the PIGMED operations.
My hope is that we would be able to leverage the same Iterator functionality. There is a
rocksdb_transaction_create_iterator
but theiterator_t
is the same.Thoughts?
The text was updated successfully, but these errors were encountered: