Skip to content

Commit 3e072e2

Browse files
committed
Instead of checkpoint.version + 1 use just old_version + 1
1 parent bc9a5d8 commit 3e072e2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

kernel/src/snapshot.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ impl Snapshot {
7676
/// We implement a simple heuristic:
7777
/// 1. if the new version == existing version, just return the existing snapshot
7878
/// 2. if the new version < existing version, error: there is no optimization to do here
79-
/// 3. list from (existing checkpoint version + 1) onward (or just existing snapshot version if
80-
/// no checkpoint)
79+
/// 3. list from (existing snapshot version + 1) onward
8180
/// 4. a. if new checkpoint is found: just create a new snapshot from that checkpoint (and
8281
/// commits after it)
8382
/// b. if no new checkpoint is found: do lightweight P+M replay on the latest commits (after
@@ -128,8 +127,7 @@ impl Snapshot {
128127
let log_root = old_log_segment.log_root.clone();
129128
let storage = engine.storage_handler();
130129

131-
// Start listing just after the previous segment's checkpoint, if any
132-
let listing_start = old_log_segment.checkpoint_version.unwrap_or(0) + 1;
130+
let listing_start = old_version + 1;
133131

134132
// Check for new commits (and CRC)
135133
let new_listed_files = ListedLogFiles::list(

0 commit comments

Comments
 (0)