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): cherry-pick fix duplicated sst_id generated by split_sst function #18432

Merged
merged 3 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/meta/src/hummock/manager/commit_epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl HummockManager {
}
}

new_sst_id_number += group_table_ids.len();
new_sst_id_number += group_table_ids.len() * 2;
sst_to_cg_vec.push((commit_sst, group_table_ids));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,8 @@ pub fn validate_version(version: &HummockVersion) -> Vec<String> {
pub fn split_sst(sst_info: &mut SstableInfo, new_sst_id: &mut u64) -> SstableInfo {
let mut branch_table_info = sst_info.clone();
branch_table_info.sst_id = *new_sst_id;
sst_info.sst_id = *new_sst_id + 1;
*new_sst_id += 1;
sst_info.sst_id = *new_sst_id;
*new_sst_id += 1;

branch_table_info
Expand Down
Loading