diff --git a/src/meta/src/hummock/compaction/picker/trivial_move_compaction_picker.rs b/src/meta/src/hummock/compaction/picker/trivial_move_compaction_picker.rs index 6e172f15d3804..458919cd8b717 100644 --- a/src/meta/src/hummock/compaction/picker/trivial_move_compaction_picker.rs +++ b/src/meta/src/hummock/compaction/picker/trivial_move_compaction_picker.rs @@ -55,7 +55,7 @@ impl TrivialMovePicker { ) -> Option { let mut skip_by_pending = false; for sst in select_tables { - if sst.file_size < self.sst_allowed_trivial_move_min_size { + if sst.sst_size < self.sst_allowed_trivial_move_min_size { continue; } @@ -128,6 +128,7 @@ pub mod tests { let sst = SstableInfo { sst_id: 1, file_size: 100, + sst_size: 100, ..Default::default() }; diff --git a/src/meta/src/hummock/compaction/picker/vnode_watermark_picker.rs b/src/meta/src/hummock/compaction/picker/vnode_watermark_picker.rs index 50a33c7d42e4f..5171c48ad9c34 100644 --- a/src/meta/src/hummock/compaction/picker/vnode_watermark_picker.rs +++ b/src/meta/src/hummock/compaction/picker/vnode_watermark_picker.rs @@ -50,7 +50,7 @@ impl VnodeWatermarkCompactionPicker { return None; } Some(CompactionInput { - select_input_size: select_input_ssts.iter().map(|sst| sst.file_size).sum(), + select_input_size: select_input_ssts.iter().map(|sst| sst.sst_size).sum(), total_file_count: select_input_ssts.len() as u64, input_levels: vec![ InputLevel { diff --git a/src/meta/src/hummock/manager/commit_epoch.rs b/src/meta/src/hummock/manager/commit_epoch.rs index 6c56890c07a1d..0853e28fcb572 100644 --- a/src/meta/src/hummock/manager/commit_epoch.rs +++ b/src/meta/src/hummock/manager/commit_epoch.rs @@ -441,7 +441,7 @@ impl HummockManager { continue; } - let origin_sst_size = sst.sst_info.file_size; + let origin_sst_size = sst.sst_info.sst_size; let new_sst_size = match_ids .iter() .map(|id| { diff --git a/src/meta/src/manager/diagnose.rs b/src/meta/src/manager/diagnose.rs index e50242a9d44e6..afacce8dfdecb 100644 --- a/src/meta/src/manager/diagnose.rs +++ b/src/meta/src/manager/diagnose.rs @@ -475,7 +475,7 @@ impl DiagnoseCommand { let mut visit_level = |level: &Level| { sst_num += level.table_infos.len(); sst_total_file_size += - level.table_infos.iter().map(|t| t.file_size).sum::(); + level.table_infos.iter().map(|t| t.sst_size).sum::(); for sst in &level.table_infos { if sst.total_key_count == 0 { continue; diff --git a/src/storage/hummock_sdk/src/compaction_group/hummock_version_ext.rs b/src/storage/hummock_sdk/src/compaction_group/hummock_version_ext.rs index 90278b661738f..d1db6ad4ff87d 100644 --- a/src/storage/hummock_sdk/src/compaction_group/hummock_version_ext.rs +++ b/src/storage/hummock_sdk/src/compaction_group/hummock_version_ext.rs @@ -1016,8 +1016,8 @@ fn split_sst_info_for_level( let branch_sst = split_sst( sst_info, new_sst_id, - sst_info.file_size / 2, - sst_info.file_size / 2, + sst_info.sst_size / 2, + sst_info.sst_size / 2, member_table_ids.iter().cloned().collect_vec(), ); insert_table_infos.push(branch_sst); @@ -1342,10 +1342,10 @@ pub fn split_sst( ) -> SstableInfo { let mut branch_table_info = sst_info.clone(); branch_table_info.sst_id = *new_sst_id; - branch_table_info.file_size = new_sst_size; + branch_table_info.sst_size = new_sst_size; sst_info.sst_id = *new_sst_id + 1; - sst_info.file_size = old_sst_size; + sst_info.sst_size = old_sst_size; { // related github.com/risingwavelabs/risingwave/pull/17898/ diff --git a/src/storage/src/hummock/compactor/compaction_utils.rs b/src/storage/src/hummock/compactor/compaction_utils.rs index e579534427baa..093612623cce8 100644 --- a/src/storage/src/hummock/compactor/compaction_utils.rs +++ b/src/storage/src/hummock/compactor/compaction_utils.rs @@ -507,7 +507,7 @@ pub fn optimize_by_copy_block(compact_task: &CompactTask, context: &CompactorCon .collect_vec(); let compaction_size = sstable_infos .iter() - .map(|table_info| table_info.file_size) + .map(|table_info| table_info.sst_size) .sum::(); let all_ssts_are_blocked_filter = sstable_infos @@ -574,7 +574,7 @@ pub async fn generate_splits_for_task( .collect_vec(); let compaction_size = sstable_infos .iter() - .map(|table_info| table_info.file_size) + .map(|table_info| table_info.sst_size) .sum::(); if !optimize_by_copy_block { @@ -611,7 +611,7 @@ pub fn metrics_report_for_task(compact_task: &CompactTask, context: &CompactorCo .collect_vec(); let select_size = select_table_infos .iter() - .map(|table| table.file_size) + .map(|table| table.sst_size) .sum::(); context .compactor_metrics @@ -624,7 +624,7 @@ pub fn metrics_report_for_task(compact_task: &CompactTask, context: &CompactorCo .with_label_values(&[&group_label, &cur_level_label]) .inc_by(select_table_infos.len() as u64); - let target_level_read_bytes = target_table_infos.iter().map(|t| t.file_size).sum::(); + let target_level_read_bytes = target_table_infos.iter().map(|t| t.sst_size).sum::(); let next_level_label = compact_task.target_level.to_string(); context .compactor_metrics @@ -659,7 +659,7 @@ pub fn calculate_task_parallelism(compact_task: &CompactTask, context: &Compacto .collect_vec(); let compaction_size = sstable_infos .iter() - .map(|table_info| table_info.file_size) + .map(|table_info| table_info.sst_size) .sum::(); let parallel_compact_size = (context.storage_opts.parallel_compact_size_mb as u64) << 20; calculate_task_parallelism_impl( diff --git a/src/storage/src/hummock/compactor/fast_compactor_runner.rs b/src/storage/src/hummock/compactor/fast_compactor_runner.rs index 8cf65e66c1de7..9851afc47f148 100644 --- a/src/storage/src/hummock/compactor/fast_compactor_runner.rs +++ b/src/storage/src/hummock/compactor/fast_compactor_runner.rs @@ -492,10 +492,10 @@ impl CompactorRunner { } let mut total_read_bytes = 0; for sst in &self.left.sstables { - total_read_bytes += sst.file_size; + total_read_bytes += sst.sst_size; } for sst in &self.right.sstables { - total_read_bytes += sst.file_size; + total_read_bytes += sst.sst_size; } self.metrics .compact_fast_runner_bytes