Skip to content

Commit

Permalink
Plenty of asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
archang19 committed Jan 21, 2025
1 parent 3fd79f5 commit 5e67c21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/db_impl/db_impl_compaction_flush.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3501,6 +3501,7 @@ void DBImpl::BackgroundCallCompaction(PrepickedCompaction* prepicked_compaction,

assert(num_running_compactions_ > 0);
num_running_compactions_--;
assert(num_running_compaction_input_iterators_ >= 0);
assert(num_running_compaction_input_iterators_ >=
num_compaction_input_iterators_added);
num_running_compaction_input_iterators_ -=
Expand Down Expand Up @@ -3745,6 +3746,7 @@ Status DBImpl::BackgroundCompaction(bool* made_progress,
num_compaction_input_iterators_added =
static_cast<int>(GetNumberCompactionInputIterators(c.get()));
assert(num_compaction_input_iterators_added >= 0);
assert(num_running_compaction_input_iterators_ >= 0);
num_running_compaction_input_iterators_ +=
num_compaction_input_iterators_added;

Expand Down

0 comments on commit 5e67c21

Please sign in to comment.