Skip to content

Commit

Permalink
example(kv): add 1 to recovered memtable's seqno
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Aug 8, 2024
1 parent 9ef92a2 commit d426fd2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/kv/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ impl KvStore {
start.elapsed().as_secs_f32()
);

let seqno = SequenceNumberCounter::new(memtable.get_highest_seqno().unwrap_or_default());
let seqno = SequenceNumberCounter::new(
memtable
.get_highest_seqno()
.map(|x| x + 1)
.unwrap_or_default(),
);

tree.set_active_memtable(memtable);

Expand Down

0 comments on commit d426fd2

Please sign in to comment.