mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-30 07:59:40 -08:00
Merge pull request #1421 from prometheus/beorn7/fix
Fix a very special case of handling the checkpoint timer
This commit is contained in:
commit
5eff37ccbe
|
@ -966,6 +966,13 @@ loop:
|
||||||
} else {
|
} else {
|
||||||
dirtySeriesCount = 0
|
dirtySeriesCount = 0
|
||||||
}
|
}
|
||||||
|
// If a checkpoint takes longer than checkpointInterval, unluckily timed
|
||||||
|
// combination with the Reset(0) call below can lead to a case where a
|
||||||
|
// time is lurking in C leading to repeated checkpointing without break.
|
||||||
|
select {
|
||||||
|
case <-checkpointTimer.C: // Get rid of the lurking time.
|
||||||
|
default:
|
||||||
|
}
|
||||||
checkpointTimer.Reset(s.checkpointInterval)
|
checkpointTimer.Reset(s.checkpointInterval)
|
||||||
case fp := <-memoryFingerprints:
|
case fp := <-memoryFingerprints:
|
||||||
if s.maintainMemorySeries(fp, model.Now().Add(-s.dropAfter)) {
|
if s.maintainMemorySeries(fp, model.Now().Add(-s.dropAfter)) {
|
||||||
|
|
Loading…
Reference in a new issue