db325a5904
Summary: Logically, subcompactions process a key range [start, end); however, the way this is currently implemented is that the `CompactionIterator` for any given subcompaction keeps processing key-values until it actually outputs a key that is out of range, which is then discarded. Instead of doing this, the patch introduces a new type of internal iterator called `ClippingIterator` which wraps another internal iterator and "clips" its range of key-values so that any KVs returned are strictly in the [start, end) interval. This does eliminate a (minor) inefficiency by stopping processing in subcompactions exactly at the limit; however, the main motivation is related to BlobDB: namely, we need this to be able to measure the amount of garbage generated by a subcompaction precisely and prevent off-by-one errors. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8327 Test Plan: `make check` Reviewed By: siying Differential Revision: D28761541 Pulled By: ltamasi fbshipit-source-id: ee0e7229f04edabbc7bed5adb51771fbdc287f69 |
||
---|---|---|
.. | ||
clipping_iterator_test.cc | ||
clipping_iterator.h | ||
compaction_iteration_stats.h | ||
compaction_iterator_test.cc | ||
compaction_iterator.cc | ||
compaction_iterator.h | ||
compaction_job_stats_test.cc | ||
compaction_job_test.cc | ||
compaction_job.cc | ||
compaction_job.h | ||
compaction_picker_fifo.cc | ||
compaction_picker_fifo.h | ||
compaction_picker_level.cc | ||
compaction_picker_level.h | ||
compaction_picker_test.cc | ||
compaction_picker_universal.cc | ||
compaction_picker_universal.h | ||
compaction_picker.cc | ||
compaction_picker.h | ||
compaction_service_test.cc | ||
compaction.cc | ||
compaction.h | ||
sst_partitioner.cc |