From bed493422472f28ddf8e5ff3f212c4b6860896ca Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 9 Feb 2017 01:53:57 +0100 Subject: [PATCH] storage: One more persist error code path discovered Also, in that code path, set chunkDescsOffset to 0 rather than -1 in case of "dropped more chunks from persistence than from memory" so that no other weird things happen before the series is quarantined for good. --- storage/local/storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/local/storage.go b/storage/local/storage.go index 63eb94698..25dc30b0a 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -1513,7 +1513,8 @@ func (s *MemorySeriesStorage) writeMemorySeries( series.chunkDescsOffset -= numDroppedFromPersistence if series.chunkDescsOffset < 0 { persistErr = errors.New("dropped more chunks from persistence than from memory") - series.chunkDescsOffset = -1 + series.chunkDescsOffset = 0 + return true } } return false