cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go
BSD 3-Clause "New" or "Revised" License
4.95k stars 458 forks source link

Question: how pebble ordering range keys? #4134

Closed al8n closed 3 weeks ago

al8n commented 3 weeks ago

Hi, sorry for asking the question here, as I cannot find another public server to ask something about pebble implementation.

I am really curious about how range keys are ordered in Skiplist. For point keys, the order is straightforward. However, for the range keys, they consist of a start bound and an end bound, how they are ordered in skiplist?

I see the memtable contains three skiplists, two of them are rangeDelSkl and rangeSetSkl, but I cannot find out how the range keys are ordered in the skiplist. Is it just ordered by bytes order or some special order?

Jira issue: PEBBLE-295

al8n commented 3 weeks ago

Find slack channel, will ask this question there.