storage: Don't panic if storage has no FPs even after initial wait

This commit is contained in:
beorn7 2017-04-18 15:59:12 +02:00
parent 10f6453829
commit 1dd737d7c3

View file

@ -1341,7 +1341,7 @@ func (s *MemorySeriesStorage) cycleThroughMemoryFingerprints() chan model.Finger
} }
begin := time.Now() begin := time.Now()
fps := s.fpToSeries.sortedFPs() fps := s.fpToSeries.sortedFPs()
if firstPass { if firstPass && len(fps) > 0 {
// Start first pass at a random location in the // Start first pass at a random location in the
// key space to cover the whole key space even // key space to cover the whole key space even
// in the case of frequent restarts. // in the case of frequent restarts.