Skip to content

Commit ed968bd

Browse files
authored
Merge pull request #19770 from k8s-infra-cherrypick-robot/cherry-pick-19762-to-release-3.6
[release-3.6] emit compaction pause duration metric in every compaction batch
2 parents 52bddd0 + 0e5db4e commit ed968bd

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)