-
Notifications
You must be signed in to change notification settings - Fork 157
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
Support for ChecksumGeneratorFactory #739
Comments
Yes it would be nice. But before we start working on the details, I want to be sure that you understand the current status of this crate. Right now, the master branch is linked with TiKV's fork of RocksDB 6.29 (https://github.com/tikv/rocksdb). And we don't have a clear plan to update it yet. In fact, we are lowkey working on a new binding crate tirocks designed to replace this one. When that happens, this crate will likely be archived. |
The version isn't a problem as 6.29 supports full file checksum. But in that case, do you recomend using tirocks instead? |
tirocks is not production ready yet. But it would be fairly easy to port full checksum then because tirocks has a superior binding generation workflow.
Great. To port full checksum in rust-rocksdb, you can start with the existing code of compaction filter. They have a very similar structure. My recent commit refactored the compaction filter interface (9e46788). You can pretty much see how a binding is implemented: (1) declare ffi in c.h (2) implement ffi in c.cc (3) implement rust wrapper of raw C pointer. For structures involving callbacks (such as compaction filter or checksum generator), we need to pass Rust function as C function pointer, and Rust struct as C raw pointer. You can see it in action with |
Thanks for the directions! I'll look into it. |
It would be nice to have a trait for implementing customized checksum generator factories as described in https://github.com/facebook/rocksdb/wiki/Full-File-Checksum-and-Checksum-Handoff#how-to-use-full-file-checksum
The API is here https://github.com/facebook/rocksdb/blob/main/include/rocksdb/file_checksum.h
I'm not sure how this could be implemented but I would be glad to help.
The text was updated successfully, but these errors were encountered: