Skip to content

Commit

Permalink
locks trailers during iteration (#3595)
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-d authored Apr 12, 2021
1 parent 46eff3c commit d9637a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/logql/stats/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func decodeTrailers(ctx context.Context) Result {
if !ok {
return res
}
collector.Lock()
defer collector.Unlock()
res.Ingester.TotalReached = int32(len(collector.trailers))
for _, meta := range collector.trailers {
ing := decodeTrailer(ctx, meta)
Expand Down

0 comments on commit d9637a6

Please sign in to comment.