qianye1001 opened a new pull request, #11154:
URL: https://github.com/apache/rocketmq/pull/11154
### Which Issue(s) This PR Fixes
Fixes #11153.
### Brief Description
`NettyRemotingClient` currently submits NameServer connection probes to a
dedicated pool with 4 core threads, up to 10 workers and a queue of 32 tasks.
Those workers wait for connection results that Netty already exposes
asynchronously.
Initiate the probes directly from the existing housekeeping timer and update
availability through connection-future listeners. Remove the scan executor
entirely, including its construction and shutdown, eliminating
`NettyClientScan_thread_` workers. The existing scan switch and interval are
retained.
The scan uses a nonblocking attempt on the existing channel-table lock so
that contention defers a probe to the next scan instead of blocking
housekeeping. Pending or failed connections are not advertised as available,
and callbacks check the current address list, connection and shutdown state
before applying results. No new executor, timer or public configuration is
added.
### How Did You Test This Change?
JDK 11, with Checkstyle and SpotBugs enabled:
```shell
mvn -B -pl remoting -am -Dmaven.gitcommitid.skip=true \
-Dtest=NettyRemotingClientNameServerTest,NettyRemotingClientTest \
-Dsurefire.failIfNoSpecifiedTests=false test
```
All 26 tests passed (10 new probe tests and 16 existing client tests).
Coverage includes pending connections without blocking housekeeping, connection
failure and retry, address removal, replacement connections, channel-lock
contention, the disabled scan switch, inactive channels and shutdown. A real
TCP test verifies availability after connecting and removal after the server
stops.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]