mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 13:57:36 -08:00
Addressed Goutham's review.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
This commit is contained in:
parent
cd9516316a
commit
9d9c45588e
|
@ -90,15 +90,15 @@ func (q *querier) Select(sortSeries bool, hints *storage.SelectHints, ms ...*lab
|
||||||
return storage.EmptySeriesSet(), nil, nil
|
return storage.EmptySeriesSet(), nil, nil
|
||||||
}
|
}
|
||||||
if len(q.blocks) == 1 {
|
if len(q.blocks) == 1 {
|
||||||
|
// Sorting Head series is slow, and unneeded when only the
|
||||||
|
// Head is being queried.
|
||||||
return q.blocks[0].Select(sortSeries, hints, ms...)
|
return q.blocks[0].Select(sortSeries, hints, ms...)
|
||||||
}
|
}
|
||||||
|
|
||||||
ss := make([]storage.SeriesSet, len(q.blocks))
|
ss := make([]storage.SeriesSet, len(q.blocks))
|
||||||
var ws storage.Warnings
|
var ws storage.Warnings
|
||||||
for i, b := range q.blocks {
|
for i, b := range q.blocks {
|
||||||
// Sorting Head series is slow, and unneeded when only the
|
// We have to sort if blocks > 1 as MergedSeriesSet requires it.
|
||||||
// Head is being queried. Sorting blocks is a noop.
|
|
||||||
// Still we have to sort if blocks > 1 as MergedSeriesSet requires it.
|
|
||||||
s, w, err := b.Select(true, hints, ms...)
|
s, w, err := b.Select(true, hints, ms...)
|
||||||
ws = append(ws, w...)
|
ws = append(ws, w...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue