-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Provide our own C interface to rocksdb. #128
Conversation
LGTM |
d3f4fdf
to
580fc9e
Compare
Stop using the rocksdb C interface and instead provide our own C interface to rocksdb. This makes it cleaner to implement various bits of cockroach-specific functionality in C++ such as the compaction filter logic and merge operator.
|
||
// Applies a batch of operations (puts, merges and deletes) to the | ||
// database atomically. | ||
DBStatus DBWrite(DBEngine* db, DBBatch *batch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've started to regret making the DBBatch a different sort of object. I think we should revert to the Viewfinder model, where a batch is just another type of engine (as is snapshot) and give DBEngine a Flush() method which is normally a noop but executes a write batch in the event the engine is really a DBBatch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, guess I didn't beat that horse long enough. Yeah, happy to switch over to the viewfinder model in a subsequent change.
Do you think DBSnapshot should be a type of DBEngine as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Same as with Viewfinder. It'll simplify the go code as well--so annoying to have to call SnapshotGet(), etc. And having to create a batch object and then commit it when you don't really need the batch functionality is a pain.
LGTM |
580fc9e
to
8be8538
Compare
Provide our own C interface to rocksdb.
…ap_retryCount fix fot retryCount map
Enable ARM64 Workflow
Stop using the rocksdb C interface and instead provide our own C
interface to rocksdb. This makes it cleaner to implement various bits of
cockroach-specific functionality in C++ such as the compaction filter
logic and merge operator.