Skip to content

Commit

Permalink
CancelAllBackgroundWork: Flush does not wait for stall conditions to …
Browse files Browse the repository at this point in the history
…clear
  • Loading branch information
Yuval-Ariel committed Feb 20, 2024
1 parent 2bb49eb commit 29e91cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,9 @@ void DBImpl::CancelAllBackgroundWork(bool wait) {
if (!shutting_down_.load(std::memory_order_acquire) &&
has_unpersisted_data_.load(std::memory_order_relaxed) &&
!mutable_db_options_.avoid_flush_during_shutdown) {
s = DBImpl::FlushAllColumnFamilies(FlushOptions(), FlushReason::kShutDown);
auto flush_options = FlushOptions();
flush_options.allow_write_stall = true;
s = DBImpl::FlushAllColumnFamilies(flush_options, FlushReason::kShutDown);
s.PermitUncheckedError(); //**TODO: What to do on error?
}

Expand Down

0 comments on commit 29e91cb

Please sign in to comment.