From 54ee71e16d52ba6d9ed62725e5d223dd6ee14bc3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 20 Jan 2022 20:11:56 +0200 Subject: [PATCH] lib/storage: set bsm.Block to nil on error, so the previous block couldn't be used. This may help nailing down the issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2082 --- lib/storage/block_stream_merger.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/storage/block_stream_merger.go b/lib/storage/block_stream_merger.go index e41301e70..d48ad81a9 100644 --- a/lib/storage/block_stream_merger.go +++ b/lib/storage/block_stream_merger.go @@ -88,12 +88,14 @@ func (bsm *blockStreamMerger) nextBlock() error { } if err := bsrMin.Error(); err != nil { + bsm.Block = nil return err } heap.Pop(&bsm.bsrHeap) if len(bsm.bsrHeap) == 0 { + bsm.Block = nil return io.EOF }