Merge pull request #3257 from prometheus/beorn7/storage2

Avoid blocking in the logThrottling loop
This commit is contained in:
Björn Rabenstein 2017-10-06 14:55:16 +02:00 committed by GitHub
commit 5fad671af9

View file

@ -999,7 +999,10 @@ func (s *MemorySeriesStorage) logThrottling() {
select { select {
case <-s.throttled: case <-s.throttled:
if !timer.Stop() { if !timer.Stop() {
<-timer.C select {
case <-timer.C:
default:
}
score, _ := s.getPersistenceUrgencyScore() score, _ := s.getPersistenceUrgencyScore()
log. log.
With("urgencyScore", score). With("urgencyScore", score).