Skip to content

Commit

Permalink
fix(storage): fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Li0k committed Dec 20, 2022
1 parent f4fddb1 commit 6bc3f31
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/meta/src/hummock/compaction/level_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ impl LevelSelectorCore {
/ self.config.level0_tier_compact_file_number,
);

let total_size = levels.l0.as_ref().unwrap().total_file_size
- handlers[0].get_pending_output_file_size(ctx.base_level as u32);
let total_size =
levels.l0.as_ref().unwrap().total_file_size - handlers[0].get_pending_file_size();
if idle_file_count > 0 {
// trigger intra-l0 compaction at first when the number of files is too large.
let l0_score =
Expand Down
4 changes: 2 additions & 2 deletions src/meta/src/hummock/compaction_schedule_policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ impl CompactionSchedulePolicy for ScoredPolicy {
if last_idle_time.elapsed().as_secs() > MAX_IDLE_TIME {
let decrease_core = self
.score_to_compactor
.iter()
.map(|(_, compactor)| compactor.max_concurrent_task_number())
.values()
.map(|compactor| compactor.max_concurrent_task_number())
.min()
.unwrap_or(0);
return ScalePolicy::ScaleIn(decrease_core);
Expand Down
2 changes: 1 addition & 1 deletion src/rpc_client/src/hummock_meta_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use risingwave_hummock_sdk::{
};
use risingwave_pb::hummock::{
CompactTask, CompactTaskProgress, CompactionGroup, CompactorWorkload, HummockSnapshot,
HummockVersion, SubscribeCompactTasksResponse, VacuumTask,
HummockVersion, VacuumTask,
};

use crate::error::Result;
Expand Down

0 comments on commit 6bc3f31

Please sign in to comment.