You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "btlqql (via GitHub)" <gi...@apache.org> on 2026/10/15 14:59:44 UTC

[PR] fix(proxy): retry the proxy remoting client after a failed start without amplifying failures [rocketmq-dashboard]

btlqql opened a new pull request, #6761:
URL: https://github.com/apache/rocketmq-dashboard/pull/6761

   Supersedes #5352 (stale-bot closed) — same concurrency fix, with all four review asks and both notes applied. The branch also merged onto the current `rocketmq-studio` cleanly.
   
   ## The fix
   
   A first `NettyRemotingClient.start()` failure left a permanently unstarted client published for any concurrent first-use caller, and the failing caller could hand a half-initialised client to `invokeSync`. The client is now published only after `start()` returned, and a failed candidate is disposed with its disposal failure chained onto the rethrown start failure via `addSuppressed`.
   
   ## Review asks from #5352, applied
   
   1. **Bounded shutdown:** shutdown no longer contends on the initialisation lock — it takes a `ReentrantLock.tryLock(5s)`; a hung `start()` therefore cannot stall `@PreDestroy` until SIGKILL, and a shutdown skipped for a client still initialising is logged and accepted (the JVM is going away either way).
   2. **No failure amplification:** a failed start now starts a 30s cooldown; within the window the memoized failure is rethrown without paying another construct/start/shutdown Netty lifecycle, so one group-list request costs at most one lifecycle instead of (groups x proxies) per request. The window is a package-visible field so tests can disable or extend it.
   3. `shutdownFailedCandidateQuietly` catches `RuntimeException` only, and the disposal failure is chained via `addSuppressed` on the rethrown start failure instead of vanishing into a log line.
   4. Both latch awaits are wrapped in `assertThat(...).as(...).isTrue()`, so a latch that never fires fails fast with a named assertion.
   5. Import order restored (`Mock` before `MockedConstruction`), and the concurrency test documents why both `invokeSync` labels are deliberately the same string.
   
   ## Tests
   
   `ProxyConsumerResolverTest` is 9/9: the two original mutation-sensitive regressions keep pinning the publication contract (the first-failure test runs with the cooldown disabled), plus a new `aFailedStartIsNotRetriedWithinTheCooldownWindowTest` asserting a second query inside the window rethrows the memoized failure and never constructs a second client.
   
   cc @lizhimins
   


-- 
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): retry the proxy remoting client after a failed start without amplifying failures [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6761:
URL: https://github.com/apache/rocketmq-dashboard/pull/6761#issuecomment-6512130223

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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): retry the proxy remoting client after a failed start without amplifying failures [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6761: fix(proxy): retry the proxy remoting client after a failed start without amplifying failures
URL: https://github.com/apache/rocketmq-dashboard/pull/6761


-- 
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