mirror of https://github.com/facebook/rocksdb.git
db536ee045
Summary: In `FileMetaData`, we keep track of the lowest-numbered blob file referenced by the SST file in question for the purposes of BlobDB's garbage collection in the `oldest_blob_file_number` field, which is updated in `UpdateBoundaries`. However, with the current code, `BlobIndex` decoding errors (or invalid blob file numbers) are swallowed in this method. The patch changes this by propagating these errors and failing the corresponding flush/compaction. (Note that since blob references are generated by the BlobDB code and also parsed by `CompactionIterator`, in reality this can only happen in the case of memory corruption.) This change necessitated updating some unit tests that involved fake/corrupt `BlobIndex` objects. Some of these just used a dummy string like `"blob_index"` as a placeholder; these were replaced with real `BlobIndex`es. Some were relying on the earlier behavior to simulate corruption; these were replaced with `SyncPoint`-based test code that corrupts a valid blob reference at read time. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9851 Test Plan: `make check` Reviewed By: riversand963 Differential Revision: D35683671 Pulled By: ltamasi fbshipit-source-id: f7387af9945c48e4d5c4cd864f1ba425c7ad51f6 |
||
---|---|---|
.. | ||
clipping_iterator.h | ||
clipping_iterator_test.cc | ||
compaction.cc | ||
compaction.h | ||
compaction_iteration_stats.h | ||
compaction_iterator.cc | ||
compaction_iterator.h | ||
compaction_iterator_test.cc | ||
compaction_job.cc | ||
compaction_job.h | ||
compaction_job_stats_test.cc | ||
compaction_job_test.cc | ||
compaction_picker.cc | ||
compaction_picker.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_service_test.cc | ||
file_pri.h | ||
sst_partitioner.cc |