Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
Signed-off-by: Little-Wallace <[email protected]>
  • Loading branch information
Little-Wallace committed May 15, 2024
1 parent 98f28ed commit 4c9f9fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/meta/src/hummock/manager/compaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ impl HummockManager {
for input_ssts in &compact_task.input_ssts {
for sst in &input_ssts.table_infos {
existing_table_ids.extend(sst.table_ids.iter());
if !sst.table_ids.is_empty() {
*table_size_info.entry(sst.table_ids[0]).or_default() +=
for table_id in &sst.table_ids {
*table_size_info.entry(*table_id).or_default() +=
sst.file_size / (sst.table_ids.len() as u64);
}
}
Expand All @@ -302,6 +302,7 @@ impl HummockManager {
1,
params.checkpoint_frequency() * barrier_interval_ms / 1000,
);
// check latest write throughput
let history_table_throughput = self.history_table_throughput.read();
for (table_id, compact_table_size) in table_size_info {
let write_throughput = history_table_throughput
Expand All @@ -317,6 +318,7 @@ impl HummockManager {
|| (compact_table_size > compaction_config.target_file_size_base
&& write_throughput > self.env.opts.table_write_throughput_threshold)
{
// partition for large write throughput table.
compact_task
.table_vnode_partition
.insert(table_id, hybrid_vnode_count);
Expand Down

0 comments on commit 4c9f9fc

Please sign in to comment.