提交 fcd80883 编写于 作者: A anand76 提交者: Facebook GitHub Bot

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
上级 f33611d5
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册