diff --git a/core/storage/wal.rs b/core/storage/wal.rs index 1fadd9cf4..c8b5a8876 100644 --- a/core/storage/wal.rs +++ b/core/storage/wal.rs @@ -678,8 +678,8 @@ impl Wal for WalFile { return Ok((LimboResult::Ok, db_has_changed)); } } - let mut max_read_mark = 0; let mut max_read_mark_index = -1; + let mut max_read_mark = 0; // Find the largest mark we can find, ignore frames that are impossible to be in range and // that are not set for (index, lock) in self.get_shared().read_locks.iter().enumerate().skip(1) { @@ -1195,7 +1195,6 @@ impl WalFile { (max_frame, n_backfills) }; let needs_backfill = max_frame > nbackfills; - if !needs_backfill && matches!(mode, CheckpointMode::Passive) { // there are no frames to copy over and we don't need to reset // the log so we can return early success.