Skip to content

Commit

Permalink
store-gateway: fix error handling in Series() (grafana#3441)
Browse files Browse the repository at this point in the history
When the other side closed the stream, the store gateway continues
to try to send the hints. This attempt fails because the stream is
closed and the error from the attempt overwrites the original error.

That error will likely not have much useful information, but it is lost
nonetheless.

Signed-off-by: Dimitar Dimitrov <[email protected]>

Signed-off-by: Dimitar Dimitrov <[email protected]>
  • Loading branch information
dimitarvdimitrov authored and mason committed Dec 16, 2022
1 parent bb02a70 commit f61e2ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/storegateway/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,10 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, srv storepb.Store_Serie
err = nil
})

if err != nil {
return
}

var anyHints *types.Any
if anyHints, err = types.MarshalAny(resHints); err != nil {
err = status.Error(codes.Unknown, errors.Wrap(err, "marshal series response hints").Error())
Expand Down

0 comments on commit f61e2ce

Please sign in to comment.