From 8511649f7846485edfbc79eb64c44bb02e74102a Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Sun, 14 Jul 2024 10:31:06 +0200 Subject: [PATCH] Cut release candidate 0.36.0 rc.1 (#7510) * *: fix server grpc histograms (#7493) Signed-off-by: Michael Hoffmann * Close endpoints after the gRPC server has terminated (#7509) Endpoints are currently closed as soon as we receive a SIGTERM or SIGINT. This causes in-flight queries to get cancelled since outgoing connections get closed instantly. This commit moves the endpoints.Close call after the grpc server shutdown to make sure connections are available as long as the server is running. Signed-off-by: Filip Petkovski * Cut release candidate v0.36.0-rc.1 Signed-off-by: Michael Hoffmann --------- Signed-off-by: Michael Hoffmann Signed-off-by: Filip Petkovski Co-authored-by: Filip Petkovski --- CHANGELOG.md | 3 ++- VERSION | 2 +- cmd/thanos/query.go | 2 +- pkg/server/grpc/grpc.go | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d776a65047..9e24c4b570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,13 +18,14 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ### Removed -## [v0.36.0-rc.0](https://github.com/thanos-io/thanos/tree/release-0.36) - 26.06.2024 +## [v0.36.0-rc.1](https://github.com/thanos-io/thanos/tree/release-0.36) ### Fixed - [#7326](https://github.com/thanos-io/thanos/pull/7326) Query: fixing exemplars proxy when querying stores with multiple tenants. - [#7403](https://github.com/thanos-io/thanos/pull/7403) Sidecar: fix startup sequence - [#7484](https://github.com/thanos-io/thanos/pull/7484) Proxy: fix panic in lazy response set +- [#7493](https://github.com/thanos-io/thanos/pull/7493) *: fix server grpc histograms ### Added diff --git a/VERSION b/VERSION index 210bbe0449..5abe9e6575 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.36.0-rc.0 +0.36.0-rc.1 diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 41e1348b6e..4b27dd2943 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -826,6 +826,7 @@ func runQuery( }, func(error) { statusProber.NotReady(err) s.Shutdown(err) + endpoints.Close() }) } @@ -919,7 +920,6 @@ func prepareEndpointSet( }) }, func(error) { cancel() - endpointSet.Close() }) } diff --git a/pkg/server/grpc/grpc.go b/pkg/server/grpc/grpc.go index 3198fb7cb1..57b063d9b0 100644 --- a/pkg/server/grpc/grpc.go +++ b/pkg/server/grpc/grpc.go @@ -59,10 +59,10 @@ func New(logger log.Logger, reg prometheus.Registerer, tracer opentracing.Tracer met := grpc_prometheus.NewServerMetrics( grpc_prometheus.WithServerHandlingTimeHistogram( - grpc_prometheus.WithHistogramBuckets([]float64{0.001, 0.01, 0.1, 0.3, 0.6, 1, 3, 6, 9, 20, 30, 60, 90, 120}), grpc_prometheus.WithHistogramOpts(&prometheus.HistogramOpts{ - NativeHistogramBucketFactor: 1.1, + Buckets: []float64{0.001, 0.01, 0.1, 0.3, 0.6, 1, 3, 6, 9, 20, 30, 60, 90, 120}, NativeHistogramMaxBucketNumber: 256, + NativeHistogramBucketFactor: 1.1, }), ), )