mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
9797c928ef
commit
ea87f21e23
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue