Skip to content

Commit

Permalink
fix: update flushed_sequence_num after compaction (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiKaiWi authored Feb 16, 2023
1 parent 2c748bd commit 99ce395
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions analytic_engine/src/instance/flush_compaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,9 @@ impl SpaceStore {
sst_info,
);

// Update the flushed sequence number.
edit_meta.flushed_sequence = cmp::max(sst_meta.max_sequence, edit_meta.flushed_sequence);

// Store updates to edit_meta.
edit_meta.files_to_delete.reserve(input.files.len());
// The compacted file can be deleted later.
Expand All @@ -1035,6 +1038,7 @@ impl SpaceStore {
file_id: file.id(),
});
}

// Add the newly created file to meta.
edit_meta.files_to_add.push(AddFile {
level: input.output_level,
Expand Down

0 comments on commit 99ce395

Please sign in to comment.