Skip to content

Commit 56bea9f

Browse files
committed
When using Universal Compaction, Zero out seqID in the last file too
Summary: I didn't figure out the reason why the feature of zeroing out earlier sequence ID is disabled in universal compaction. I do see bottommost_level is set correctly. It should simply work if we remove the constraint of universal compaction. Test Plan: make all check Reviewers: haobo, dhruba, kailiu, igor Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D15423
1 parent abd70ec commit 56bea9f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

db/db_impl.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -2507,8 +2507,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact,
25072507
// If this is the bottommost level (no files in lower levels)
25082508
// and the earliest snapshot is larger than this seqno
25092509
// then we can squash the seqno to zero.
2510-
if (options_.compaction_style == kCompactionStyleLevel &&
2511-
bottommost_level && ikey.sequence < earliest_snapshot &&
2510+
if (bottommost_level && ikey.sequence < earliest_snapshot &&
25122511
ikey.type != kTypeMerge) {
25132512
assert(ikey.type != kTypeDeletion);
25142513
// make a copy because updating in place would cause problems

0 commit comments

Comments
 (0)