From 1dd737d7c3d1ba34a65539fb5a2ad12cd3dbb83e Mon Sep 17 00:00:00 2001 From: beorn7 Date: Tue, 18 Apr 2017 15:59:12 +0200 Subject: [PATCH] storage: Don't panic if storage has no FPs even after initial wait --- storage/local/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/local/storage.go b/storage/local/storage.go index 6e799f010..4dd27cb78 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -1341,7 +1341,7 @@ func (s *MemorySeriesStorage) cycleThroughMemoryFingerprints() chan model.Finger } begin := time.Now() fps := s.fpToSeries.sortedFPs() - if firstPass { + if firstPass && len(fps) > 0 { // Start first pass at a random location in the // key space to cover the whole key space even // in the case of frequent restarts.