-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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 DeleteRange in transactions #4812
Comments
Since DeleteRange and WritePrepared Transactions are developed in parallel we need to make sure that they are consistent with each other. One difference to watch out for is that in WritePrepared the prepare and commit sequence numbers are separate: the prepare sequence number is stored in DB with the key/value and commit is stored outside.
@ajkr What do you think? |
Unfortunately I don't know much about write-prepared to answer your question, but here's some more detail about that seqnum from the
It is used in the places you mentioned to check whether an internal key found in a memtable or SST is deleted by a range tombstone. It is also used to short-circuit the lookup process, e.g., Lines 1224 to 1228 in 3c5d1b1
The above logic exploits how we examine memtables/SSTs in newest-to-oldest order. If any covering range tombstone was found in an earlier memtable or SST, then it's definitely newer than any internal key we might find now or later in the lookup process, so we can give up early. |
I always have trouble remembering this one. Luckily @abhimadan documented it here: https://github.com/facebook/rocksdb/wiki/DeleteRange-Implementation#internal-key-range-tombstone-boundaries. |
Thanks @ajkr for the clear explanation. It was very helpful. I update the issue description will the list of required changes that we have figured so far. |
@ajkr One more question, I do not see |
@maysamyabandeh The Line 436 in 89ab138
read_seq appears to come from here in the case of Get() : Lines 1363 to 1392 in 89ab138
|
Any updates on this? |
We still need this in 2021 :-/ |
Any update on this? |
Would love this for 2024 😢 |
Now that DeleteRange is performant, it would be nice to support it in transactions as well.
Summary of the essential changes:
rocksdb/db/range_tombstone_fragmenter.cc
Line 311 in 106a94a
The text was updated successfully, but these errors were encountered: