Skip to content

Commit

Permalink
Remove invalid assertion in compaction_picker_universal.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
anand76 committed Sep 28, 2020
1 parent 1abbc56 commit 27fb620
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions db/compaction/compaction_picker_universal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ Compaction* UniversalCompactionBuilder::PickCompaction() {

// validate that all the chosen files of L0 are non overlapping in time
#ifndef NDEBUG
SequenceNumber prev_smallest_seqno = 0U;
bool is_first = true;

size_t level_index = 0U;
Expand All @@ -471,7 +470,6 @@ Compaction* UniversalCompactionBuilder::PickCompaction() {
if (is_first) {
is_first = false;
}
prev_smallest_seqno = f->fd.smallest_seqno;
}
level_index = 1U;
}
Expand All @@ -483,16 +481,7 @@ Compaction* UniversalCompactionBuilder::PickCompaction() {
&largest_seqno);
if (is_first) {
is_first = false;
} else if (prev_smallest_seqno > 0) {
// A level is considered as the bottommost level if there are
// no files in higher levels or if files in higher levels do
// not overlap with the files being compacted. Sequence numbers
// of files in bottommost level can be set to 0 to help
// compression. As a result, the following assert may not hold
// if the prev_smallest_seqno is 0.
assert(prev_smallest_seqno > largest_seqno);
}
prev_smallest_seqno = smallest_seqno;
}
}
#endif
Expand Down

0 comments on commit 27fb620

Please sign in to comment.