facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
28.09k stars 6.25k forks source link

Which version is the boundary between the two DeleteRange implementations ? #12692

Closed mzygQAQ closed 2 months ago

mzygQAQ commented 2 months ago

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

Expected behavior

N/A

Actual behavior

N/A

Steps to reproduce the behavior

N/A

Hi~
After reading the blog<>, I learned that there are two implementations of DeleteRange in RocksDB, among which v1 is based on the Skyline algorithm, V2 is based on an algorithm that fragments range tombstones. I want to know, Which version has made changes from v1 to v2? I want to understand the differences between the two by reading the source code~ Thank you everyone.

I am not a native English speaker, but I have translated these through translation apps. There may be grammar errors or offensive writing due to cultural differences. I apologize for any inconvenience caused!

mzygQAQ commented 2 months ago

@ajkr

ajkr commented 2 months ago

Hi, I would say v5.17.2 (https://github.com/facebook/rocksdb/tree/v5.17.2) was the latest version using the skyline implementation of DeleteRange().

Any release 5.18 or newer has the v2 implementation. It gradually improved over time so I'd just look at the latest code. By the way, every time I think about DeleteRange() v2, I first read this doc: https://github.com/cockroachdb/pebble/blob/e9edae8a5a90beba845b5dec543d5d78885f5d2a/docs/range_deletions.md. It has the step by step explanation of how we ended up in the current state for DeleteRange() v2.

mzygQAQ commented 2 months ago

Thank you very much for your reply , it's very helpful to me! Wish you have a great day!