Skip to content

Commit 74185ef

Browse files
authored
Stop async executor on shutdown in distributor (#7602)
* fix(distributor): stop async executor on shutdown Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * changelog Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> --------- Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
1 parent ad0a071 commit 74185ef

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
* [BUGFIX] Ring: Fix ring token conflict resolution only applied to updated instance and make constantly token conflict check during instance observe period.
5656
* [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
5757
* [BUGFIX] Query Frontend: Fix native histogram responses not being handled correctly in `minTime()` sort ordering for split_by_interval merge. #7555
58+
* [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
5859
* [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
5960

6061
## 1.21.0 2026-04-24

pkg/distributor/distributor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ func (d *Distributor) cleanupInactiveUser(userID string) {
562562

563563
// Called after distributor is asked to stop via StopAsync.
564564
func (d *Distributor) stopping(_ error) error {
565+
d.asyncExecutor.Stop()
565566
return services.StopManagerAndAwaitStopped(context.Background(), d.subservices)
566567
}
567568

0 commit comments

Comments
 (0)