Skip to content

Commit

Permalink
fix(storage): cherry-pick fix duplicated sst_id generated by split_ss…
Browse files Browse the repository at this point in the history
…t function (#18432)
  • Loading branch information
Li0k authored Sep 6, 2024
1 parent 727ac73 commit a9ed85a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit a9ed85a

Please sign in to comment.