Merge pull request #11761 from bboreham/querier-reuse-iterator

tsdb: re-use iterator when stepping through chunks
pull/11617/head
Ganesh Vernekar 2022-12-23 13:33:30 +05:30 committed by GitHub
commit e6f2577c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ func (p *populateWithDelSeriesIterator) Next() chunkenc.ValueType {
if p.currDelIter != nil { if p.currDelIter != nil {
p.curr = p.currDelIter p.curr = p.currDelIter
} else { } else {
p.curr = p.currChkMeta.Chunk.Iterator(nil) p.curr = p.currChkMeta.Chunk.Iterator(p.curr)
} }
if valueType := p.curr.Next(); valueType != chunkenc.ValNone { if valueType := p.curr.Next(); valueType != chunkenc.ValNone {
return valueType return valueType