Skip to content

Commit 29e91cb

Browse files
committed
CancelAllBackgroundWork: Flush does not wait for stall conditions to clear
1 parent 2bb49eb commit 29e91cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

db/db_impl/db_impl.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,9 @@ void DBImpl::CancelAllBackgroundWork(bool wait) {
550550
if (!shutting_down_.load(std::memory_order_acquire) &&
551551
has_unpersisted_data_.load(std::memory_order_relaxed) &&
552552
!mutable_db_options_.avoid_flush_during_shutdown) {
553-
s = DBImpl::FlushAllColumnFamilies(FlushOptions(), FlushReason::kShutDown);
553+
auto flush_options = FlushOptions();
554+
flush_options.allow_write_stall = true;
555+
s = DBImpl::FlushAllColumnFamilies(flush_options, FlushReason::kShutDown);
554556
s.PermitUncheckedError(); //**TODO: What to do on error?
555557
}
556558

0 commit comments

Comments
 (0)