diff --git a/db/compaction/compaction_picker_universal.cc b/db/compaction/compaction_picker_universal.cc index 30bbd406c..8d782f59b 100644 --- a/db/compaction/compaction_picker_universal.cc +++ b/db/compaction/compaction_picker_universal.cc @@ -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; @@ -471,7 +470,6 @@ Compaction* UniversalCompactionBuilder::PickCompaction() { if (is_first) { is_first = false; } - prev_smallest_seqno = f->fd.smallest_seqno; } level_index = 1U; } @@ -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