Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storage): fix duplicated sst_id generated by split_sst function #18431

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading