From 22e0b9ef3d66c83fc0268060ff141144d223bcf1 Mon Sep 17 00:00:00 2001 From: SungJin1212 Date: Mon, 8 Jun 2026 16:46:06 +0900 Subject: [PATCH 1/2] fix(distributor): stop async executor on shutdown Signed-off-by: SungJin1212 --- pkg/distributor/distributor.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index 21abf9f8a4..b8c0d52c45 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -562,6 +562,7 @@ func (d *Distributor) cleanupInactiveUser(userID string) { // Called after distributor is asked to stop via StopAsync. func (d *Distributor) stopping(_ error) error { + d.asyncExecutor.Stop() return services.StopManagerAndAwaitStopped(context.Background(), d.subservices) } From f1969920947d229ceb2a2b1a5cc419442372a22b Mon Sep 17 00:00:00 2001 From: SungJin1212 Date: Mon, 8 Jun 2026 16:51:47 +0900 Subject: [PATCH 2/2] changelog Signed-off-by: SungJin1212 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d44feb16..0756d48d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ * [BUGFIX] Ring: Fix ring token conflict resolution only applied to updated instance and make constantly token conflict check during instance observe period. * [BUGFIX] Distributor: Fix a panic (`slice bounds out of range`) in the stream push path when the context deadline expires while the worker goroutine is still marshalling a `WriteRequest`. #7541 * [BUGFIX] Query Frontend: Fix native histogram responses not being handled correctly in `minTime()` sort ordering for split_by_interval merge. #7555 +* [BUGFIX] Distributor: Release the push worker pool goroutines on shutdown by stopping the async executor during the stopping phase when `-distributor.num-push-workers` is set. #7602 * [BUGFIX] Querier: Fix unbounded resource leak in the bucket-scan blocks finder (used when the bucket index is disabled). Per-tenant metadata fetchers, their Prometheus registries, and on-disk meta caches are now evicted once a tenant is no longer active, instead of being retained for the lifetime of the process. #7573 ## 1.21.0 2026-04-24