You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Asthenia0412 (via GitHub)" <gi...@apache.org> on 2026/10/13 12:41:21 UTC
[PR] fix(proxy): shutdown all thread pools in DefaultReceiptHandleManager [rocketmq]
Asthenia0412 opened a new pull request, #11421:
URL: https://github.com/apache/rocketmq/pull/11421
## Summary
Fixes apache/rocketmq#11393
DefaultReceiptHandleManager.shutdown() only stopped the scheduled executor but leaked the `renewalWorkerService` and `returnHandleGroupWorkerService` worker pools, causing proxy restart to leave orphan threads running.
## Changes
Added shutdown() calls for both thread pools after draining in clearAllHandle() in the shutdown hook.
## Testing
- Compile check (limited by sandbox network)
- Unit test scope unchanged - defensive shutdown calls
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(proxy): shutdown all thread pools in DefaultReceiptHandleManager [rocketmq]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #11421:
URL: https://github.com/apache/rocketmq/pull/11421#issuecomment-6197781242
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
The referenced issue #11393 is a confirmed bug: `DefaultReceiptHandleManager.shutdown()` leaks the `renewalWorkerService` and `returnHandleGroupWorkerService` worker pools, leaving orphan threads after proxy shutdown.
The proposed fix — adding defensive `shutdown()` calls for both pools after `clearAllHandle()` in the shutdown hook — is the correct approach.
An automated fix proposal (spec) will be generated based on this analysis. Reply `/approve` to proceed with PR generation, or `/reject` to decline.
---
*Automated evaluation by RockteMQ-AI*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(proxy): shutdown all thread pools in DefaultReceiptHandleManager [rocketmq]
Posted by "yx9o (via GitHub) via commits" <co...@rocketmq.apache.org>.
yx9o commented on code in PR #11421:
URL: https://github.com/apache/rocketmq/pull/11421#discussion_r4652382013
##########
proxy/src/main/java/org/apache/rocketmq/proxy/service/receipt/DefaultReceiptHandleManager.java:
##########
@@ -128,6 +128,12 @@ public void start() throws Exception {
public void shutdown() throws Exception {
scheduledExecutorService.shutdown();
clearAllHandle();
+ if (renewalWorkerService != null) {
+ renewalWorkerService.shutdown();
+ }
+ if (returnHandleGroupWorkerService != null) {
+ returnHandleGroupWorkerService.shutdown();
Review Comment:
If the inactivity scanner removes a receipt group just before this pool shuts down, its cleanup submission can be silently dropped, leaving the messages invisible until their timeout. Could we stop and drain the scanner before closing this pool?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org