-
Notifications
You must be signed in to change notification settings - Fork 727
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
Q: How to access the sequence number of an entry? #325
Comments
Does the RocksDB itself exposes this functionality? |
Sorry, I should have looked for a reference sooner. Admittedly I'm not that good at reading large C code bases any more, but it looks like there are a couple of functions related to sequence numbers. There's |
Thank you for a little investigation. This function is indeed exists in a public API (and Java bindings exports it as well). It would be fairly easy to add. If you want, you can send a PR (or I can do it myself). |
You're much better off not letting me touch the code. :) |
Fantastic, thank you. The reason I asked about the sequence number is that I want to implement a secondary index in RocksDB, and the sequence number is a very good way to detect stale index records. The project is here, https://github.com/nlfiedler/mokuroku -- still needs a lot of work though. |
Cherry-picking the following changes that fixes zlib, jemalloc and gflags dependencies, and fixes a flaky test: ``` 6ead62c 2019-07-25 yiwu@pingcap.com Avoid build require system zlib (rust-rocksdb#303) 9246b9c 2019-07-25 hi@breeswish.org Skip jemalloc options on specific platform (rust-rocksdb#324) 7a8dd73 2019-07-22 yiwu@pingcap.com Add jemalloc-sys dependency when jemalloc is enabled (rust-rocksdb#320) 6f2c632 2019-07-23 yiwu@pingcap.com Not compile with gflags (rust-rocksdb#322) 09b8032 2019-07-22 yiwu@pingcap.com Fix perf context test (rust-rocksdb#321) d67f38e 2019-07-21 yiwu@pingcap.com Add jemalloc feature (rust-rocksdb#319) ``` Also update rocksdb to fix compile error with gcc9: ``` 7a03c83ed 2019-07-23 psergey@askmonty.org Fix MyRocks compile warnings-treated-as-errors on Fedora 30, gcc 9.1.1 (#5553) ```
Seems like RocksDB tags every entry with a monotonically increasing sequence number, and there might be some means of accessing that. In fact, it looks like getting a snapshot should return the current sequence number. Is this exposed somewhere in rust-rocksb and I just can't find it? Thanks for your help.
The text was updated successfully, but these errors were encountered: