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 |
||
---|---|---|
.. | ||
blob_constants.h | ||
blob_counting_iterator.h | ||
blob_counting_iterator_test.cc | ||
blob_fetcher.cc | ||
blob_fetcher.h | ||
blob_file_addition.cc | ||
blob_file_addition.h | ||
blob_file_addition_test.cc | ||
blob_file_builder.cc | ||
blob_file_builder.h | ||
blob_file_builder_test.cc | ||
blob_file_cache.cc | ||
blob_file_cache.h | ||
blob_file_cache_test.cc | ||
blob_file_completion_callback.h | ||
blob_file_garbage.cc | ||
blob_file_garbage.h | ||
blob_file_garbage_test.cc | ||
blob_file_meta.cc | ||
blob_file_meta.h | ||
blob_file_reader.cc | ||
blob_file_reader.h | ||
blob_file_reader_test.cc | ||
blob_garbage_meter.cc | ||
blob_garbage_meter.h | ||
blob_garbage_meter_test.cc | ||
blob_index.h | ||
blob_log_format.cc | ||
blob_log_format.h | ||
blob_log_sequential_reader.cc | ||
blob_log_sequential_reader.h | ||
blob_log_writer.cc | ||
blob_log_writer.h | ||
db_blob_basic_test.cc | ||
db_blob_compaction_test.cc | ||
db_blob_corruption_test.cc | ||
db_blob_index_test.cc | ||
prefetch_buffer_collection.cc | ||
prefetch_buffer_collection.h |