Skip to content

Commit

Permalink
Cut release candidate 0.36.0 rc.1 (thanos-io#7510)
Browse files Browse the repository at this point in the history
* *: fix server grpc histograms (thanos-io#7493)

Signed-off-by: Michael Hoffmann <[email protected]>

* Close endpoints after the gRPC server has terminated (thanos-io#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 <[email protected]>

* Cut release candidate v0.36.0-rc.1

Signed-off-by: Michael Hoffmann <[email protected]>

---------

Signed-off-by: Michael Hoffmann <[email protected]>
Signed-off-by: Filip Petkovski <[email protected]>
Co-authored-by: Filip Petkovski <[email protected]>
  • Loading branch information
2 people authored and hczhu-db committed Aug 22, 2024
1 parent a6eb1ea commit 98b1df2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.36.0-rc.0
0.36.0-rc.1
2 changes: 1 addition & 1 deletion cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ func runQuery(
}, func(error) {
statusProber.NotReady(err)
s.Shutdown(err)
endpoints.Close()
})
}

Expand Down Expand Up @@ -949,7 +950,6 @@ func prepareEndpointSet(
})
}, func(error) {
cancel()
endpointSet.Close()
})
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/server/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
),
)
Expand Down

0 comments on commit 98b1df2

Please sign in to comment.