diff --git a/db.go b/db.go index bfb7d4c2c..8f452137e 100644 --- a/db.go +++ b/db.go @@ -793,7 +793,11 @@ func (db *DB) Querier(mint, maxt int64) (Querier, error) { } } if maxt >= db.head.MinTime() { - blocks = append(blocks, db.head) + blocks = append(blocks, &rangeHead{ + head: db.head, + mint: mint, + maxt: maxt, + }) } sq := &querier{ diff --git a/querier.go b/querier.go index bddb81f86..a4da8e689 100644 --- a/querier.go +++ b/querier.go @@ -499,8 +499,8 @@ func (s *baseChunkSeries) Err() error { return s.err } func (s *baseChunkSeries) Next() bool { var ( - lset labels.Labels - chkMetas []chunks.Meta + lset = make(labels.Labels, len(s.lset)) + chkMetas = make([]chunks.Meta, len(s.chks)) err error )