Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Li0k committed Aug 26, 2024
1 parent b874d67 commit 096b398
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl TrivialMovePicker {
) -> Option<SstableInfo> {
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;
}

Expand Down Expand Up @@ -128,6 +128,7 @@ pub mod tests {
let sst = SstableInfo {
sst_id: 1,
file_size: 100,
sst_size: 100,
..Default::default()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
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 @@ -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| {
Expand Down
2 changes: 1 addition & 1 deletion src/meta/src/manager/diagnose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<u64>();
level.table_infos.iter().map(|t| t.sst_size).sum::<u64>();
for sst in &level.table_infos {
if sst.total_key_count == 0 {
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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/
Expand Down
10 changes: 5 additions & 5 deletions src/storage/src/hummock/compactor/compaction_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<u64>();

let all_ssts_are_blocked_filter = sstable_infos
Expand Down Expand Up @@ -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::<u64>();

if !optimize_by_copy_block {
Expand Down Expand Up @@ -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::<u64>();
context
.compactor_metrics
Expand All @@ -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::<u64>();
let target_level_read_bytes = target_table_infos.iter().map(|t| t.sst_size).sum::<u64>();
let next_level_label = compact_task.target_level.to_string();
context
.compactor_metrics
Expand Down Expand Up @@ -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::<u64>();
let parallel_compact_size = (context.storage_opts.parallel_compact_size_mb as u64) << 20;
calculate_task_parallelism_impl(
Expand Down
4 changes: 2 additions & 2 deletions src/storage/src/hummock/compactor/fast_compactor_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 096b398

Please sign in to comment.