Skip to content
Snippets Groups Projects
Commit 50fdd2d4 authored by Tom Wilkie's avatar Tom Wilkie
Browse files

Fix bugs in ingester iterators.


Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
parent 2031845e
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@ type dumbChunkIterator struct {
}
func (i *dumbChunkIterator) Next() bool {
i.i++
return i.i < len(i.entries)
}
......
......@@ -75,7 +75,7 @@ func ReadBatch(i EntryIterator, size int) (*logproto.QueryResponse, error) {
}
result := logproto.QueryResponse{
Streams: make([]*logproto.Stream, len(streams)),
Streams: make([]*logproto.Stream, 0, len(streams)),
}
for _, stream := range streams {
result.Streams = append(result.Streams, stream)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment