store/tikv: fix gc lifetime metrics. (#2587)

This commit is contained in:
disksing
2017-02-04 13:54:03 +08:00
committed by GitHub
parent fa72f5c7d4
commit 8ddea101df

View File

@ -120,6 +120,10 @@ func (w *GCWorker) start() {
if err != nil {
log.Warnf("[gc worker] leader tick err: %v", err)
}
} else {
// Config metrics should always be updated by leader.
gcConfigGauge.WithLabelValues(gcRunIntervalKey).Set(0)
gcConfigGauge.WithLabelValues(gcLifeTimeKey).Set(0)
}
case err := <-w.done:
w.gcIsRunning = false