From be13a4ba7ed97f94f56e6309db606ac5a364e45e Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 25 Mar 2020 11:42:32 -0700 Subject: [PATCH] Compare querier storage to primary storage via reflect.DeepEqual. (#7050) Signed-off-by: Callum Styan --- storage/fanout.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/fanout.go b/storage/fanout.go index 94a4acb3d..8692078a3 100644 --- a/storage/fanout.go +++ b/storage/fanout.go @@ -16,6 +16,7 @@ package storage import ( "container/heap" "context" + "reflect" "sort" "strings" @@ -290,7 +291,7 @@ func (q *mergeGenericQuerier) Select(sortSeries bool, hints *SelectHints, matche if qryResult.selectError != nil { q.failedQueriers[qryResult.qr] = struct{}{} // 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) } else { priErr = qryResult.selectError