rocksdb/utilities
Peter Dillinger 5da900f28a Fix a case of ignored corruption in creating backups (#12200)
Summary:
We often need to read the table properties of an SST file when taking a backup. However, we currently do not check checksums for this step, and even with that enabled, we ignore failures. This change ensures we fail creating a backup if corruption is detected in that step of reading table properties.

To get this working properly (with existing unit tests), we also add some temperature handling logic like already exists in
BackupEngineImpl::ReadFileAndComputeChecksum and elsewhere in BackupEngine. Also, SstFileDumper needed a fix to its error handling logic.

This was originally intended to help diagnose some mysterious failures (apparent corruptions) seen in taking backups in the crash test, though that is now fixed in https://github.com/facebook/rocksdb/pull/12206

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12200

Test Plan: unit test added that corrupts table properties, along with existing tests

Reviewed By: ajkr

Differential Revision: D52520674

Pulled By: pdillinger

fbshipit-source-id: 032cfc0791428f3b8147d34c7d424ab128e28f42
2024-01-05 09:48:19 -08:00
..
agg_merge Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
backup Fix a case of ignored corruption in creating backups (#12200) 2024-01-05 09:48:19 -08:00
blob_db Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
cassandra Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
checkpoint Remove the default force behavior for `EnableFileDeletion` API (#12001) 2023-11-10 14:35:54 -08:00
compaction_filters Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
convenience Run clang-format on utilities/ (except utilities/transactions/) (#10853) 2022-10-24 16:38:09 -07:00
leveldb_options Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
memory Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
merge_operators Add missing license to source files (#12083) 2023-11-21 08:36:30 -08:00
option_change_migration Enforce status checking after Valid() returns false for IteratorWrapper (#11975) 2023-10-18 09:38:38 -07:00
options Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
persistent_cache Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
simulator_cache Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
table_properties_collectors Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00
trace Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
transactions Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
ttl Allow `TtlMergeOperator` to wrap an unregistered `MergeOperator` (#12056) 2023-11-10 16:57:17 -08:00
write_batch_with_index Some further cleanup in WriteBatchWithIndex::MultiGetFromBatchAndDB (#12143) 2023-12-13 17:34:18 -08:00
cache_dump_load.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load_impl.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load_impl.h Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
compaction_filters.cc Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00
counted_fs.cc Fix serious FSDirectory use-after-Close bug (missing fsync) (#10460) 2022-08-02 10:54:32 -07:00
counted_fs.h Explicitly closing all directory file descriptors (#10049) 2022-06-01 18:03:34 -07:00
debug.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_mirror.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_mirror_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
fault_injection_env.cc Explicitly closing all directory file descriptors (#10049) 2022-06-01 18:03:34 -07:00
fault_injection_env.h test: WritableFile derived class: add missing GetFileSize() override (#11726) 2023-09-29 15:58:08 -07:00
fault_injection_fs.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
fault_injection_fs.h Fix a case of ignored corruption in creating backups (#12200) 2024-01-05 09:48:19 -08:00
fault_injection_secondary_cache.cc Add some compressed and tiered secondary cache stats (#12150) 2023-12-15 11:34:08 -08:00
fault_injection_secondary_cache.h Add some compressed and tiered secondary cache stats (#12150) 2023-12-15 11:34:08 -08:00
memory_allocators.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
merge_operators.cc Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00
merge_operators.h Run clang-format on utilities/ (except utilities/transactions/) (#10853) 2022-10-24 16:38:09 -07:00
object_registry.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
object_registry_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
util_merge_operators_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
wal_filter.cc Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00