[ISSUE #10748] Fix unsupported ProxyChannel command completion - #10752
Open
ai-yang wants to merge 1 commit into
Open
[ISSUE #10748] Fix unsupported ProxyChannel command completion#10752ai-yang wants to merge 1 commit into
ai-yang wants to merge 1 commit into
Conversation
Signed-off-by: Rui <1685901819@qq.com>
ai-yang
marked this pull request as ready for review
August 2, 2026 14:21
RockteMQ-AI
reviewed
Aug 2, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Fixes a resource leak where unsupported remoting commands in ProxyChannel.writeAndFlush would leave the processFuture hanging indefinitely by completing it with UnsupportedOperationException in the default switch case.
Findings
- [Info]
ProxyChannel.java:114— AddingprocessFuture.completeExceptionally()in the default case is the correct fix. Previously, callers waiting on the future for an unsupported command code would block forever, potentially leaking threads and memory. - [Info] The exception message includes the unsupported command code, which aids debugging.
- [Info]
ProxyChannelTest.java— Test verifies that the future completes with failure, the cause isUnsupportedOperationException, and the message contains the command code. Also verifies no interaction with the relay service for unsupported commands.
Suggestions
- None. Simple, correct fix with good test coverage.
Automated review by github-manager-bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes
Brief Description
ProxyChannel.writeAndFlush()created an incompleteprocessFuturebefore dispatching aRemotingCommand, but thedefaultswitch branch only broke out of the switch. No producer remained that could complete the future, so the returned channel future stayed pending forever.This change:
How Did You Test This Change?
develop: the deterministic strengthened regression failed in 5/5 isolated JDK 8 Maven processes.proxy -amreactor: all 11 modules passed with 0 failures and 0 errors.git diff --check: passed.