Complete the fix of stress open WAL drop fix (#8570)
Summary: https://github.com/facebook/rocksdb/pull/8548 is not complete. We should instead cover all cases writable files are buffered, not just when failures are ingested. Extend it to any case where failures are ingested in DB open. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8570 Test Plan: Run db_stress and see it doesn't break Reviewed By: jay-zhuang Differential Revision: D29830415 fbshipit-source-id: 94449a0468fb2f7eec17423724008c9c63b2445d
This commit is contained in:
parent
42eaa45c1b
commit
9b41082d4a
@ -2491,6 +2491,13 @@ void StressTest::Open() {
|
||||
fault_fs_guard
|
||||
->FileExists(FLAGS_db + "/CURRENT", IOOptions(), nullptr)
|
||||
.ok()) {
|
||||
if (!FLAGS_sync) {
|
||||
// When DB Stress is not sync mode, we expect all WAL writes to
|
||||
// WAL is durable. Buffering unsynced writes will cause false
|
||||
// positive in crash tests. Before we figure out a way to
|
||||
// solve it, skip WAL from failure injection.
|
||||
fault_fs_guard->SetSkipDirectWritableTypes({kWalFile});
|
||||
}
|
||||
ingest_meta_error = FLAGS_open_metadata_write_fault_one_in;
|
||||
ingest_write_error = FLAGS_open_write_fault_one_in;
|
||||
ingest_read_error = FLAGS_open_read_fault_one_in;
|
||||
@ -2500,13 +2507,6 @@ void StressTest::Open() {
|
||||
FLAGS_open_metadata_write_fault_one_in);
|
||||
}
|
||||
if (ingest_write_error) {
|
||||
if (!FLAGS_sync) {
|
||||
// When DB Stress is not sync mode, we expect all WAL writes to
|
||||
// WAL is durable. Buffering unsynced writes will cause false
|
||||
// positive in crash tests. Before we figure out a way to
|
||||
// solve it, skip WAL from failure injection.
|
||||
fault_fs_guard->SetSkipDirectWritableTypes({kWalFile});
|
||||
}
|
||||
fault_fs_guard->SetFilesystemDirectWritable(false);
|
||||
fault_fs_guard->EnableWriteErrorInjection();
|
||||
fault_fs_guard->SetRandomWriteError(
|
||||
|
Loading…
Reference in New Issue
Block a user