cockroachdb / pebble

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

sstable: add FragmentIterTransforms #3708

Closed RaduBerinde closed 4 days ago

RaduBerinde commented 4 days ago

We add a separate struct for transforms passed to the fragment iterator. This includes the option to elide keys at the same sequence number.

We also move the underlying block.Iter handle initialization to the fragment iterator constructor. It's up to the iterator to decide what transformations to pass to that "raw" iterator. For example, prefix and suffix synthesis will happen in the FragmentIter and these options won't be passed to the block.Iter.

cockroach-teamcity commented 4 days ago

This change is Reviewable