Skip to content

Commit

Permalink
Revert the assert in num_running_flushes to if
Browse files Browse the repository at this point in the history
  • Loading branch information
udi-speedb committed Jan 24, 2024
1 parent 2f57c7b commit 19ccaee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions memtable/write_buffer_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,9 @@ void WriteBufferManager::FlushEnded(bool /* wbm_initiated */) {
// the WBM will not be aware of the number of running flushes at the time
// it is enabled. The counter will become valid once all of the flushes
// that were running when it was enabled will have completed.
assert(num_running_flushes_ > 0U);
--num_running_flushes_;
if (num_running_flushes_ > 0U) {
--num_running_flushes_;
}

size_t curr_memory_used = memory_usage();
RecalcFlushInitiationSize();
Expand Down

0 comments on commit 19ccaee

Please sign in to comment.