Skip to content

Commit

Permalink
reuse overlapping array in batch iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena committed Aug 2, 2019
1 parent 34af657 commit ce7b5a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (it *batchChunkIterator) nextBatch() (iter.EntryIterator, error) {
//
// And nextChunk is # 49, we need to keep references to #47 and #48 as they won't be
// iterated over completely (we're clipping through to #49's from) and then add them to the next batch.
it.lastOverlapping = []*chunkenc.LazyChunk{}
it.lastOverlapping = it.lastOverlapping[:0]
for _, c := range batch {
if it.req.Direction == logproto.BACKWARD {
if c.Chunk.From.Before(nextChunk.Chunk.Through) || c.Chunk.From == nextChunk.Chunk.Through {
Expand Down

0 comments on commit ce7b5a4

Please sign in to comment.