feat(metricstore): compute buffer stats eagerly on checkpoint load

This commit is contained in:
Aditya Ujeniya
2026-07-20 10:49:24 +02:00
parent 650db33b22
commit e37b2e71a6
2 changed files with 30 additions and 0 deletions
+3
View File
@@ -501,6 +501,9 @@ func (l *Level) loadFile(cf *CheckpointFile, m *MemoryStore) error {
next: nil,
archived: true,
}
// Front-load the single scan so the first stat query hits the cache
// instead of lazily rescanning this checkpoint-loaded buffer.
b.recomputeStats()
minfo, ok := m.Metrics[name]
if !ok {