mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
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
This commit is contained in:
parent
5159a9451f
commit
54ee71e16d
1 changed files with 2 additions and 0 deletions
|
@ -88,12 +88,14 @@ func (bsm *blockStreamMerger) nextBlock() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := bsrMin.Error(); err != nil {
|
if err := bsrMin.Error(); err != nil {
|
||||||
|
bsm.Block = nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
heap.Pop(&bsm.bsrHeap)
|
heap.Pop(&bsm.bsrHeap)
|
||||||
|
|
||||||
if len(bsm.bsrHeap) == 0 {
|
if len(bsm.bsrHeap) == 0 {
|
||||||
|
bsm.Block = nil
|
||||||
return io.EOF
|
return io.EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue