Temporarily disable file deletion after open failure in db_stress (#8489)

Summary:
Write and metadata error injection during DB open was enabled in https://github.com/facebook/rocksdb/issues/8474. This causes crash tests to fail very frequently due to another fault injection feature that deletes files created after the last dir sync during DB open. In real life, a similar failure would happen if the FS returns error on the CURRENT file rename, but the rename actually succeeded and got partially persisted (dir entry for the old CURRENT file got removed, but the entry for the new one is not persisted). Temporarily disable the fault injection feature until we figure out the likelihood of this bug happening and the proper way to fix it.

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

Test Plan: Stress test can open the DB successfully

Reviewed By: siying

Differential Revision: D29564516

Pulled By: anand1976

fbshipit-source-id: ffd1650715ea3c5bf7131936b0ca6fcf66f4e14e
main
anand76 4 years ago committed by Facebook GitHub Bot
parent f33611d5e9
commit fcd8088333
  1. 6
      db_stress_tool/db_stress_test_base.cc

@ -2558,10 +2558,16 @@ void StressTest::Open() {
ingest_read_error = false;
Random rand(static_cast<uint32_t>(FLAGS_seed));
// TODO: This is disabled for now as deleting the CURRENT file after open
// failure causes the DB to not be reopened again due to the presence of
// WAL files, which DB::Open considers to be a corruption. Re-enable once
// we figure out a proper fix
#if 0
if (rand.OneIn(2)) {
fault_fs_guard->DeleteFilesCreatedAfterLastDirSync(IOOptions(),
nullptr);
}
#endif
if (rand.OneIn(3)) {
fault_fs_guard->DropUnsyncedFileData();
} else if (rand.OneIn(2)) {

Loading…
Cancel
Save