Skip to content

Commit

Permalink
fix(meta): fix trivial move failed because of no member table ids (ri…
Browse files Browse the repository at this point in the history
…singwavelabs#8725)

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
  • Loading branch information
Little-Wallace authored Mar 23, 2023
1 parent 1df800a commit 92584b6
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 92584b6

Please sign in to comment.