-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Flush(sync=true) not supported in DB::Open() and db_stress #10784
Conversation
41a68fa
to
47d55d1
Compare
65d0af4
to
c4958a6
Compare
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@anand1976 Updated the DB::Open path and PR summary to reflect our offline discussion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Update to main |
c4958a6
to
c6370ba
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -836,7 +836,7 @@ void StressTest::OperateDb(ThreadState* thread) { | |||
if (thread->rand.OneInOpt(FLAGS_manual_wal_flush_one_in)) { | |||
bool sync = thread->rand.OneIn(2) ? true : false; | |||
Status s = db_->FlushWAL(sync); | |||
if (!s.ok()) { | |||
if (!s.ok() && !(sync && s.IsNotSupported())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below SyncWAL() appears susceptible to the same problem. Maybe let WS disable these features in their config until they complete support for them.
Context:
#10698 made
Flush(sync=true)
required forDB::Open()
(to pass the original but now deleted assertionimpl->TEST_WALBufferIsEmpty()
undermanual_wal_flush=true
, see #10698 summary for more ) as well as db_stress to pass.However RocksDB users may not implement SyncWAL() (used inFlush(sync=true)). Therefore we replace such in DB::Open and db_stress in this PR and align with https://github.com/facebook/rocksdb/blob/main/db/db_impl/db_impl_open.cc#L1883-L1887 and https://github.com/facebook/rocksdb/blob/main/db_stress_tool/db_stress_test_base.cc#L847-L849
Test:
make check