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(meta): fix trivial move failed because of no member table ids #8725

Merged
merged 3 commits into from
Mar 23, 2023
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
16 changes: 8 additions & 8 deletions src/meta/src/hummock/manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,12 @@ where
Some(task) => task,
};
compact_task.watermark = watermark;
compact_task.existing_table_ids = current_version
.levels
.get(&compaction_group_id)
.unwrap()
.member_table_ids
.clone();

if CompactStatus::is_trivial_move_task(&compact_task) && can_trivial_move {
compact_task.sorted_output_ssts = compact_task.input_ssts[0].table_infos.clone();
Expand All @@ -838,13 +844,6 @@ where
start_time.elapsed()
);
} else {
// to get all relational table_id from sst_info
compact_task.existing_table_ids = current_version
.levels
.get(&compaction_group_id)
.unwrap()
.member_table_ids
.clone();
compact_task.table_options = table_id_to_option
.into_iter()
.filter_map(|(table_id, table_option)| {
Expand Down Expand Up @@ -1142,6 +1141,7 @@ where
}
}
let is_success = if let TaskStatus::Success = compact_task.task_status() {
// if member_table_ids changes, the data of sstable may stale.
let is_expired = current_version
.levels
.get(&compact_task.compaction_group_id)
Expand Down Expand Up @@ -1987,7 +1987,7 @@ where
.scale_compactor_core_num
.set(suggest_scale_out_core as i64);

tracing::info!(
tracing::debug!(
"report_scale_compactor_info {:?} suggest_scale_out_core {:?}",
info,
suggest_scale_out_core
Expand Down