Skip to content

Commit

Permalink
fix(metric): include table_change_log when calculating object size #1…
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 authored Nov 8, 2024
1 parent 5e988a8 commit 0da59fb
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,14 @@ pub fn object_size_map(version: &HummockVersion) -> HashMap<HummockSstableObject
.chain(cg.levels.iter())
.flat_map(|level| level.table_infos.iter().map(|t| (t.object_id, t.file_size)))
})
.chain(version.table_change_log.values().flat_map(|c| {
c.0.iter().flat_map(|l| {
l.old_value
.iter()
.chain(l.new_value.iter())
.map(|t| (t.object_id, t.file_size))
})
}))
.collect()
}

Expand Down

0 comments on commit 0da59fb

Please sign in to comment.