Skip to content

Commit

Permalink
fix(storage): fix duplicated sst_id generated by split_sst function (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Li0k authored Sep 6, 2024
1 parent 5311069 commit b00d750
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1343,9 +1343,11 @@ pub fn split_sst(
let mut branch_table_info = sst_info.clone();
branch_table_info.sst_id = *new_sst_id;
branch_table_info.sst_size = new_sst_size;
*new_sst_id += 1;

sst_info.sst_id = *new_sst_id + 1;
sst_info.sst_id = *new_sst_id;
sst_info.sst_size = old_sst_size;
*new_sst_id += 1;

{
// related github.com/risingwavelabs/risingwave/pull/17898/
Expand All @@ -1364,8 +1366,6 @@ pub fn split_sst(
.retain(|table_id| !branch_table_info.table_ids.contains(table_id));
}

*new_sst_id += 1;

branch_table_info
}

Expand Down

0 comments on commit b00d750

Please sign in to comment.