Skip to content

Commit 89ed73c

Browse files
authored
Merge pull request #19771 from k8s-infra-cherrypick-robot/cherry-pick-19762-to-release-3.5
[release-3.5] emit compaction pause duration metric in every compaction batch
2 parents 005880d + 3aca164 commit 89ed73c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/mvcc/kvstore_compaction.go

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func (s *store) scheduleCompaction(compactMainRev, prevCompactRev int64) (KeyVal
6565
revToBytes(revision{main: compactMainRev}, rbytes)
6666
tx.UnsafePut(buckets.Meta, finishedCompactKeyName, rbytes)
6767
tx.Unlock()
68+
dbCompactionPauseMs.Observe(float64(time.Since(start) / time.Millisecond))
6869
// gofail: var compactAfterSetFinishedCompact struct{}
6970
hash := h.Hash()
7071
size, sizeInUse := s.b.Size(), s.b.SizeInUse()

0 commit comments

Comments
 (0)