mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
Compare querier storage to primary storage via reflect.DeepEqual. (#7050)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
This commit is contained in:
parent
12d53dde55
commit
be13a4ba7e
|
@ -16,6 +16,7 @@ package storage
|
||||||
import (
|
import (
|
||||||
"container/heap"
|
"container/heap"
|
||||||
"context"
|
"context"
|
||||||
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -290,7 +291,7 @@ func (q *mergeGenericQuerier) Select(sortSeries bool, hints *SelectHints, matche
|
||||||
if qryResult.selectError != nil {
|
if qryResult.selectError != nil {
|
||||||
q.failedQueriers[qryResult.qr] = struct{}{}
|
q.failedQueriers[qryResult.qr] = struct{}{}
|
||||||
// If the error source isn't the primary querier, return the error as a warning and continue.
|
// If the error source isn't the primary querier, return the error as a warning and continue.
|
||||||
if qryResult.qr != q.primaryQuerier {
|
if !reflect.DeepEqual(qryResult.qr, q.primaryQuerier) {
|
||||||
warnings = append(warnings, qryResult.selectError)
|
warnings = append(warnings, qryResult.selectError)
|
||||||
} else {
|
} else {
|
||||||
priErr = qryResult.selectError
|
priErr = qryResult.selectError
|
||||||
|
|
Loading…
Reference in a new issue