cockroachdb / pebble

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

sstable: wrap raw fragment iterators with checkers, fix issues found #3679

Closed RaduBerinde closed 3 months ago

RaduBerinde commented 3 months ago

keyspan: copy Suffix/Value in CopyFrom

tool: use DeepClone instead of ShallowClone

We were performing shallow clones of spans, which is not sufficient when the spans come from a FragmentIterator.

sstable: wrap raw fragment iterators with checkers

This change wraps raw range del and range key iterators with assertIter and invalidatingIter and we fix a few cases of using stale values (especially Prefix/Value for range keys).

cockroach-teamcity commented 3 months ago

This change is Reviewable