zmuxuny opened a new issue, #4543:
URL: https://github.com/apache/rocketmq-dashboard/issues/4543

   ### Before Creating the Bug Report
   
   - [x] I searched open/closed issues and PRs for consumer connection lookup 
failures, `onlineInstances`, Proxy fallback, and false zero-client diagnostics.
   - [x] I reproduced the behavior on current `master` 
(`d50ffecc9d7e8f8f46da64198831bd7952e6974e`).
   
   ### Problem
   
   Apache consumer-group live enrichment collapses connection-inventory 
failures into a normal empty connection set. 
`RocketMQMetadataProvider.resolveConsumerConnection` returns `null` after an 
unexpected Broker/NameServer error; the caller converts that to an empty 
instance list and `onlineInstances=0`.
   
   The Proxy fallback has the same ambiguity: `ProxyConsumerResolver` returns 
`null` both when every reachable Proxy explicitly reports `CONSUMER_NOT_ONLINE` 
and when Proxy discovery/query itself fails.
   
   ### Impact
   
   Consume stats may still be available and report positive lag while 
connection inventory is unavailable. Studio then publishes `onlineInstances=0`, 
so the web diagnostics can emit the critical finding “有堆积但无在线客户端”, and the AI 
group-detail tool can report the group UNHEALTHY, even though Studio never 
established that zero clients are online.
   ### Expected Behavior
   
   - Preserve `0` only when the connection inventory is actually available and 
confirms no clients.
   - Preserve Proxy-connected clients when Broker lookup reports the group 
offline.
   - Distinguish Proxy `CONSUMER_NOT_ONLINE` from discovery/query transport 
failures; RocketMQ Proxy explicitly returns that response code for a known 
offline group.
   - Represent unavailable connection inventory separately from zero clients so 
UI/AI diagnostics do not infer a consumer outage from a failed lookup.
   - Keep lag/consume-stat availability independent from connection-inventory 
availability.
   
   ### Red Reproduction
   
   A focused regression makes `examineConsumerConnectionInfo` fail with 
`nameserver unavailable` while `examineConsumeStats` still reports lag 40. On 
unmodified master, the expected unavailable online count is lost and the group 
is returned with `onlineInstances=0`.
   
   `RocketMQMetadataProviderTest`: **44 tests, exactly 1 failure** (`expected: 
-1 but was: 0`); the other 43 tests pass.
   ### Proposed Scope
   
   Use the existing negative-sentinel convention for `onlineInstances` (`-1` = 
unavailable), add an internal Proxy resolution status that distinguishes 
explicit offline from lookup failure, and teach web/AI health diagnostics not 
to treat unavailable connection data as zero.
   
   No persistence/schema change is required. Existing 
`resolveConsumerConnection` callers can keep the current nullable compatibility 
API while the group-health paths use the availability-aware result.
   
   AI-assisted source/protocol audit and regression authoring; the Broker/Proxy 
response paths and web/AI consumers were checked before filing.


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

Reply via email to