diff --git a/HISTORY.md b/HISTORY.md index a80bd9ca6..7e3c674ba 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,7 @@ ### Enhancements ### Bug Fixes +* CancelAllBackgroundWork: Flush does not wait for stall conditions to clear ### Miscellaneous * WriteController logging: Remove redundant reports when WC is not shared between dbs diff --git a/db/db_impl/db_impl.cc b/db/db_impl/db_impl.cc index c5a118ba9..40ac90587 100644 --- a/db/db_impl/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -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? }