From 5ec46c283ca945aec02454682832bd402fe6287e Mon Sep 17 00:00:00 2001 From: Matej Gera Date: Fri, 23 Sep 2022 16:12:39 +0200 Subject: [PATCH 1/2] Check for nil responses from heap Signed-off-by: Matej Gera --- pkg/store/proxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/store/proxy.go b/pkg/store/proxy.go index a68fab71ad..ecc412cdad 100644 --- a/pkg/store/proxy.go +++ b/pkg/store/proxy.go @@ -332,6 +332,9 @@ func (s *ProxyStore) Series(originalRequest *storepb.SeriesRequest, srv storepb. respHeap := NewDedupResponseHeap(NewProxyResponseHeap(storeResponses...)) for respHeap.Next() { resp := respHeap.At() + if resp == nil { + continue + } if resp.GetWarning() != "" && (r.PartialResponseDisabled || r.PartialResponseStrategy == storepb.PartialResponseStrategy_ABORT) { return status.Error(codes.Aborted, resp.GetWarning()) From 856b85fb9684cffc639ba90f7a84470eb46619a0 Mon Sep 17 00:00:00 2001 From: Matej Gera Date: Fri, 23 Sep 2022 16:41:49 +0200 Subject: [PATCH 2/2] Add CHANGELOG Signed-off-by: Matej Gera --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 014a220550..1e3c3e3922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#5642](https://github.com/thanos-io/thanos/pull/5642) Receive: Log labels correctly in writer debug messages. - [#5655](https://github.com/thanos-io/thanos/pull/5655) Receive: Fix recreating already pruned tenants. - [#5702](https://github.com/thanos-io/thanos/pull/5702) Store: Upgrade minio-go/v7 to fix panic caused by leaked goroutines. +- [#8711] (https://github.com/thanos-io/thanos/pull/5702) Store: Fix panic on `nil` resp from response heap in proxy. ### Added * [#5654](https://github.com/thanos-io/thanos/pull/5654) Query: add `--grpc-compression` flag that controls the compression used in gRPC client. With the flag it is now possible to compress the traffic between Query and StoreAPI nodes - you get lower network usage in exchange for a bit higher CPU/RAM usage.