Skip to content

Commit

Permalink
fix(metric): fix metric for branched sst info (#12477)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 authored Sep 26, 2023
1 parent ea9b94c commit f379371
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/meta/src/hummock/metrics_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,15 @@ pub fn trigger_split_stat(
.with_label_values(&[&group_label])
.set(member_table_id_len as _);

let branched_sst_count = branched_ssts
let branched_sst_count: usize = branched_ssts
.values()
.map(|branched_map| branched_map.iter())
.flat_map(|branched_map| {
.map(|branched_map| {
branched_map
.filter(|(group_id, _sst_id)| **group_id == compaction_group_id)
.map(|(_, v)| v)
.keys()
.filter(|group_id| **group_id == compaction_group_id)
.count()
})
.sum::<u64>();
.sum();

metrics
.branched_sst_count
Expand Down

0 comments on commit f379371

Please sign in to comment.