You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "unbridled-41 (via GitHub)" <gi...@apache.org> on 2026/09/13 01:04:10 UTC

[PR] fix(metadata): treat client-reported offline and broadcast groups as empty results [rocketmq-dashboard]

unbridled-41 opened a new pull request, #4259:
URL: https://github.com/apache/rocketmq-dashboard/pull/4259

   Fixes #4258.
   
   ## Problem / Evidence
   
   On the Apache vendor path, two ordinary group states make the consumer group detail drawer fail with HTTP 502 instead of showing empty live data:
   
   - **Every client of the group disconnected** (consumer stopped, app restarted): the drawer's subscriptions call (`web/src/pages/instance/consumer.tsx:415` → `MetadataService.getGroupSubscriptions` → `RocketMQMetadataProvider.getGroupSubscriptions`) fails with **502 "Failed to get subscriptions for group X: CODE: 206  DESC: Not found the consumer group connection ..."**. rocketmq-tools 5.5.0 bytecode (`DefaultMQAdminExtImpl.examineConsumerConnectionInfo`) throws `MQClientException(206, "Not found the consumer group connection")` when the broker returns an empty connection set.
   - **Broadcast-mode group**: the drawer's progress call (`consumer.tsx:435` → `getGroupProgress`) fails with **502 "Failed to get progress for group X: CODE: 213  DESC: Not found the consumer group consume stats, because return offset table is empty, the consumer is under the broadcast mode ..."**. Bytecode confirms tools throws `MQClientException(213, ...)` for that state.
   
   Root cause: `RocketMQMetadataProvider.isGroupNotOnline` (RocketMQMetadataProvider.java:726-733 at 6c24d2ed) only matched `MQBrokerException(CONSUMER_NOT_ONLINE)` or a message containing `"not online"` — neither tool-thrown variant matches, so both fall through to `BusinessException(502, ...)`.
   
   ## Root cause / Fix
   
   `isGroupNotOnline` now also consults `MqResponseCodes.hasResponseCode(e, CONSUMER_NOT_ONLINE, BROADCAST_CONSUMPTION)` and matches the `"Not found the consumer group connection"` message — the same grading `RocketMQClientProvider.isGroupConnectionAbsent` (merged for #4006) already applies on the clients page. The subscriptions path keeps its existing behavior for graded states (proxy fallback first, then an empty list); the progress path returns an empty list, exactly like its existing not-online branch.
   
   ## Priority & scoring
   
   PRIORITY 74 = 影响 30(详情抽屉订阅/进度两个标签页对正常业务状态硬失败 502,无可用 workaround)+ 波及 13(Apache vendor 的消费组详情两个端点)+ 可复现 18(停掉消费者或使用广播消费即 100% 复现)+ 维护价值 13(#4006 已修孪生副本,谓词漂移应收敛)。FIX_CONFIDENCE 90:字节码级证实异常形态、同文件已有 not-online 分级语义、兄弟 provider 已有同款谓词。
   
   ## Tests
   
   - New regressions (red on 6c24d2ed, actual output): `RocketMQMetadataProviderTest.getGroupSubscriptionsShouldReturnEmptyWhenClientReportsGroupOfflineTest` → `BusinessException: Failed to get subscriptions for group group-offline: CODE: 206  DESC: Not found the consumer group connection ...`; `getGroupProgressShouldReturnEmptyForBroadcastGroupTest` → `Failed to get progress for group group-broadcast: CODE: 213  DESC: ... the consumer is under the broadcast mode ...`. Both assert empty results and pass after the fix.
   - Module suite: `mvn -o test -Dtest='RocketMQMetadataProviderTest,RocketMQAdminClientImplTest,RocketMQClientProviderTest,MetadataServiceTest'` → 151/151 passed.
   - Full backend suite on this branch (`mvn -o test`): **2153 tests, 3 failures** = the pristine 6c24d2ed baseline set (AuthCorsIntegrationTest ×2 + the load-fragile `OpenAiCompatibleLlmGatewayTest.successfulAndFailedStreamsEmitOneTerminalSequence`, isolated-passing in prior rounds); 2153 = baseline 2151 + 2 new regressions. Zero new failures.
   
   ## Risk
   
   Low: the predicate only widens the "no live data" grading; genuine connectivity failures (`IllegalStateException`, timeouts, topic routes unrelated to the group) still surface as 502 (covered by the existing `getGroupProgressSurfacesAdminFailure` / `getGroupSubscriptionsSurfacesAdminFailure` tests, still green). Cloud providers are untouched.
   


-- 
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(metadata): treat client-reported offline and broadcast groups as empty results [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #4259: fix(metadata): treat client-reported offline and broadcast groups as empty results
URL: https://github.com/apache/rocketmq-dashboard/pull/4259


-- 
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(metadata): treat client-reported offline and broadcast groups as empty results [rocketmq-dashboard]

Posted by "unbridled-41 (via GitHub)" <gi...@apache.org>.
unbridled-41 commented on PR #4259:
URL: https://github.com/apache/rocketmq-dashboard/pull/4259#issuecomment-5649841906

   ## Verification evidence
   
   - **CI (this head)**: run 34729592551 ("CI", `pull_request`, head `a282cddd4a3ede6e391d332965bc9d59d05fa6bc`) — conclusion `startup_failure`, check-runs 0. The upstream workflow fails at startup for every branch (unapproved Docker actions, see #4136), so no CI signal is available for any change here; local verification below covers the compile/test surface the workflow would have run.
   - **Red (actual output, on 6c24d2ed code)**: `RocketMQMetadataProviderTest.getGroupSubscriptionsShouldReturnEmptyWhenClientReportsGroupOfflineTest` → `BusinessException: Failed to get subscriptions for group group-offline: CODE: 206  DESC: Not found the consumer group connection`; `getGroupProgressShouldReturnEmptyForBroadcastGroupTest` → `Failed to get progress for group group-broadcast: CODE: 213  DESC: Not found the consumer group consume stats, because return offset table is empty, the consumer is under the broadcast mode`. Summary: `Tests run: 42, Failures: 0, Errors: 2`.
   - **Module tests (after fix)**: `mvn -o test -Dtest='RocketMQMetadataProviderTest,RocketMQAdminClientImplTest,RocketMQClientProviderTest,MetadataServiceTest'` → 42 + 46 + 27 + 36 = **151/151 passed**, including the pre-existing admin-failure tests (`getGroupProgressSurfacesAdminFailure`, `getGroupSubscriptionsSurfacesAdminFailure`) that pin genuine failures to 502.
   - **Full suite + baseline**: `mvn -o test` on this branch → **2153 tests, 3 failures** (`AuthCorsIntegrationTest` ×2 — the pristine baseline pair, plus `OpenAiCompatibleLlmGatewayTest.successfulAndFailedStreamsEmitOneTerminalSequence` — the load-fragile case recorded in earlier rounds, passing isolated). 2153 = baseline 2151 + 2 new regressions. Zero new failures.
   - **Build**: the full run compiles main + test sources (`BUILD FAILURE` only due to the 3 pre-existing test failures above); no separate compile errors.
   - **Diff self-check**: `git show --numstat` = `RocketMQMetadataProvider.java +13/−1`, `RocketMQMetadataProviderTest.java +29/−0`. 2 files, no unrelated 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(metadata): treat client-reported offline and broadcast groups as empty results [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #4259:
URL: https://github.com/apache/rocketmq-dashboard/pull/4259#issuecomment-5694564904

   Merged as part of #4284 — squashed into `rocketmq-studio` as `796c02e18`.
   
   Your change here (treating client-reported offline and broadcast groups as empty results) is included.
   
   We grouped 6 of your related back-end fixes into a single commit so the history stays reviewable; the other PRs in the group are closed with the same note. Everything was cherry-picked onto the current baseline with you kept as the author, and your tests came along with the change.
   
   Thanks for the consistently well-tested patches.


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