unbridled-41 opened a new pull request, #5958:
URL: https://github.com/apache/rocketmq-dashboard/pull/5958
### Which Issue(s) This PR Fixes
Fixes #5957
### Problem / Evidence
```java
// ProxyConsumerResolver.resolveConsumerConnectionStatus (before)
if (result.connection() != null) {
return ConsumerConnectionResolution.available(result.connection());
}
```
```
ProxyConsumerResolverTest#resolveConsumerConnectionStatusShouldUnionClientsFromEveryProxyTest
Expecting actual ... (only the first proxy's client and topic)
```
Each proxy knows only its own channels, so a group whose members are spread
over several proxies was reported with one proxy's connection set, subscription
table and model as the whole inventory. The group list (`instances`,
`onlineInstances`), the group detail read and the AI group-detail verdict all
consume that value, and the sibling client scan in the same package already
unions every proxy (`RocketMQClientProvider.findConsumerConnections`, pinned by
`directConsumerOnAnotherBrokerInTheClusterRemainsVisibleTest`).
### Root cause / Fix
An early return where the data is per-proxy. Ask every proxy and merge:
connections deduped by client id and address, subscription tables unioned
(first wins per topic), the group-level model/consume-type taken from the first
non-null - while keeping the existing accounting ("no proxy knows the group"
stays a known-offline answer, an unreadable proxy keeps the resolution
unavailable).
### Priority and scoring
**PRIORITY 68** — impact 26/40 (under-reported online clients/subscriptions
with a plausible value, and the AI verdict reasons on the subset), blast radius
14/20 (every proxy-connected group), reproducibility 16/20 (pinned by the new
test; needs a multi-proxy group in practice), maintenance value 12/20 (aligns
the two proxy reads in one package).
**FIX_CONFIDENCE 82** — no new RPC kinds; the same calls, plus a merge. The
extra queries are bounded by the discovered proxy list (cached per request) and
the existing 2 s timeout.
### Tests
`cd server && mvn -o -B -ntp test -Dtest='ProxyConsumerResolverTest'` ->
`Tests run: 7, Failures: 0, Errors: 0`;
`-Dtest='RocketMQMetadataProviderTest,RocketMQClientProviderTest'` -> `Tests
run: 91, Failures: 0, Errors: 0`.
| Test | Before | After |
|---|---|---|
| `resolveConsumerConnectionStatusShouldUnionClientsFromEveryProxyTest` |
FAIL (first proxy only) | PASS (both clients, both topics) |
|
`resolveConsumerConnectionStatusShouldDistinguishOfflineFromProxyFailureTest` |
PASS | PASS (accounting unchanged) |
`mvn -o -B -ntp checkstyle:check` passes.
### Risk
A group that lives on several proxies now costs one query per proxy instead
of stopping at the first answer; the proxy list is already cached per request
and the existing timeout applies to each call.
--
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]