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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4543
   
   ### Brief Description
   
   Apache consumer connection inventory previously collapsed operational lookup 
failures into `onlineInstances=0`. Consume stats could still report positive 
lag, so web/AI health diagnostics could conclude “backlog with no online 
consumer” even though the connection count was never established.
   
   This change preserves three distinct states:
   - a successful Broker/Proxy connection result publishes its real client 
count;
   - Broker offline plus Proxy `CONSUMER_NOT_ONLINE` (or a successfully 
observed empty Proxy set) remains a trustworthy zero;
   - Broker/Proxy discovery or connection-query failures publish 
`onlineInstances=-1` as unavailable.
   
   The existing nullable Proxy resolver API remains compatible; 
availability-aware group-health paths use an internal resolution result.### 
Diagnostic Behavior
   
   - Web tables/statistics render negative connection counts as `不可用` instead 
of `-1`/`0`.
   - Web health emits `CONNECTION_STATUS_UNKNOWN` and does not emit 
`NO_ACTIVE_CLIENTS_WITH_LAG` for unavailable connection inventory.
   - AI group detail reports `UNKNOWN` rather than `UNHEALTHY` when connection 
inventory is unavailable.
   - Lag/consume-stat availability remains independent: reliable backlog data 
is still returned even when connection inventory fails.
   
   ### Red / Green Verification
   
   Baseline: `master@d50ffecc9d7e8f8f46da64198831bd7952e6974e`.
   
   Fail-before, Java 21: `RocketMQMetadataProviderTest` **44 tests, exactly 1 
failure**; the new case expected unavailable `onlineInstances=-1` but current 
master returned `0` while lag remained 40.Green, Java 21:
   - 
`ProxyConsumerResolverTest,RocketMQMetadataProviderTest,RocketMQAdminClientImplTest,ConsumerGroupReadToolHandlersTest`:
 **119/119 passed**.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**.
   
   Frontend:
   - `consumerGroupDiagnostics.test.ts`: **4/4 passed**.
   - Touched-file ESLint and Prettier checks passed.
   - `npm run build`: **BUILD SUCCESS** (`8046 modules transformed`).
   - `git diff --check`: clean.
   
   The ConsumerPage stack-race regression is timing-sensitive under the 
full-file run; its targeted rerun passed on this branch and on the clean 
baseline. The touched connection-diagnostic unit suite is green.### 
Compatibility / Risk
   
   No database schema, mutation path, provider SDK, or endpoint shape change. 
`onlineInstances` remains numeric; the established negative-sentinel convention 
is now documented as `-1 = unavailable` for connection inventory.
   
   Known zero clients remain zero, Proxy-connected consumers remain 
discoverable, and transient discovery failures are not cached as an empty Proxy 
set.
   
   AI-assisted source/protocol audit, implementation and regression authoring; 
RocketMQ Proxy's explicit `CONSUMER_NOT_ONLINE` response was used to separate a 
known offline group from an unavailable query.


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