Skip to content

Commit 638b410

Browse files
authored
Merge pull request #19762 from miancheng7/fixCompactionPauseMetric
emit compaction pause duration metric in every compaction batch
2 parents 061e59a + 818dec3 commit 638b410

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/storage/mvcc/kvstore_compaction.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func (s *store) scheduleCompaction(compactMainRev, prevCompactRev int64) (KeyVal
6363
// gofail: var compactBeforeSetFinishedCompact struct{}
6464
UnsafeSetFinishedCompact(tx, compactMainRev)
6565
tx.Unlock()
66+
dbCompactionPauseMs.Observe(float64(time.Since(start) / time.Millisecond))
6667
// gofail: var compactAfterSetFinishedCompact struct{}
6768
hash := h.Hash()
6869
size, sizeInUse := s.b.Size(), s.b.SizeInUse()

0 commit comments

Comments
 (0)