rocksdb/db_stress_tool
sdong b1a53db327 FaultInjectionTestFS::DeleteFilesCreatedAfterLastDirSync() to recover… (#8501)
Summary:
… small overwritten files.
If a file is overwritten with renamed and the parent path is not synced, FaultInjectionTestFS::DeleteFilesCreatedAfterLastDirSync() will delete the file. However, RocksDB relies on file renaming to be atomic no matter whether the parent directory is synced or not, and the current behavior breaks the assumption and caused some false positive: https://github.com/facebook/rocksdb/pull/8489

Since the atomic renaming is used in CURRENT files, to fix the problem, in FaultInjectionTestFS::DeleteFilesCreatedAfterLastDirSync(), we recover the state of overwritten file if the file is small.

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

Test Plan: Run stress test for a while and see it doesn't break.

Reviewed By: anand1976

Differential Revision: D29594384

fbshipit-source-id: 589b5c2f0a9d2aca53752d7bdb0231efa5b3ae92
2021-07-07 16:23:23 -07:00
..
batched_ops_stress.cc Integrity protection for live updates to WriteBatch (#7748) 2021-01-29 12:18:58 -08:00
cf_consistency_stress.cc Fix cf_consistency_stress for backup/restore, harmonize (#7373) 2020-09-10 22:55:06 -07:00
CMakeLists.txt Mark dependencies as PRIVATE and fix missing dependencies in tools. (#6790) 2020-05-12 21:07:55 -07:00
db_stress_common.cc Add user-defined timestamps to db_stress (#8061) 2021-03-23 05:13:30 -07:00
db_stress_common.h Allow db_stress to use a secondary cache (#8455) 2021-06-27 23:54:39 -07:00
db_stress_compaction_filter.h Fix unused variable failure (#7004) 2020-06-18 22:06:51 -07:00
db_stress_driver.cc Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
db_stress_driver.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_env_wrapper.h db_stress to add --open_metadata_write_fault_one_in (#8235) 2021-04-28 10:58:05 -07:00
db_stress_gflags.cc Stress test to inject read failures in DB reopen (#8476) 2021-07-06 11:05:27 -07:00
db_stress_listener.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_shared_state.cc Silence false alarms in db_stress fault injection (#6741) 2020-04-24 13:06:12 -07:00
db_stress_shared_state.h Stress test to inject read failures in DB reopen (#8476) 2021-07-06 11:05:27 -07:00
db_stress_stat.h Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
db_stress_table_properties_collector.h Mark files for compaction in stress/crash tests (#7231) 2020-08-10 16:17:56 -07:00
db_stress_test_base.cc FaultInjectionTestFS::DeleteFilesCreatedAfterLastDirSync() to recover… (#8501) 2021-07-07 16:23:23 -07:00
db_stress_test_base.h Inject fatal write failures to db_stress when DB is running (#8479) 2021-07-01 14:16:47 -07:00
db_stress_tool.cc Stress test to inject read failures in DB reopen (#8476) 2021-07-06 11:05:27 -07:00
db_stress.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
no_batched_ops_stress.cc Inject fatal write failures to db_stress when DB is running (#8479) 2021-07-01 14:16:47 -07:00