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_compaction_filter.cc | ||
blob_compaction_filter.h | ||
blob_db_gc_stats.h | ||
blob_db_impl_filesnapshot.cc | ||
blob_db_impl.cc | ||
blob_db_impl.h | ||
blob_db_iterator.h | ||
blob_db_listener.h | ||
blob_db_test.cc | ||
blob_db.cc | ||
blob_db.h | ||
blob_dump_tool.cc | ||
blob_dump_tool.h | ||
blob_file.cc | ||
blob_file.h |