Skip to content

Commit

Permalink
Fix group-replica error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhu-db committed Jun 3, 2024
1 parent b2f8333 commit dcc818e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/store/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ func (s *ProxyStore) Series(originalRequest *storepb.SeriesRequest, srv storepb.

logGroupReplicaErrors := func() {
if len(failedStores) > 0 {
level.Warn(s.logger).Log("msg", "Group/replica errors", "errors", failedStores)
level.Warn(s.logger).Log("msg", "Group/replica errors",
"errors", fmt.Sprintf("%+v", failedStores),
"total_failed_stores", totalFailedStores,
)
}
}
defer logGroupReplicaErrors()
Expand All @@ -411,6 +414,7 @@ func (s *ProxyStore) Series(originalRequest *storepb.SeriesRequest, srv storepb.
respSet, err := newAsyncRespSet(ctx, st, r, s.responseTimeout, s.retrievalStrategy, &s.buffers, r.ShardInfo, reqLogger, s.metrics.emptyStreamResponses)
if err != nil {
level.Error(reqLogger).Log("err", err)
level.Warn(s.logger).Log("msg", "Store failure", "group", st.GroupKey(), "replica", st.ReplicaKey(), "err", err)
bumpCounter(st.GroupKey(), st.ReplicaKey(), failedStores)
totalFailedStores++
if r.PartialResponseStrategy == storepb.PartialResponseStrategy_GROUP_REPLICA {
Expand Down

0 comments on commit dcc818e

Please sign in to comment.