Merge pull request #3257 from prometheus/beorn7/storage2

Avoid blocking in the logThrottling loop
pull/3259/head
Björn Rabenstein 2017-10-06 14:55:16 +02:00 committed by GitHub
commit 5fad671af9
1 changed files with 4 additions and 1 deletions

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).