unbridled-41 commented on PR #11040: URL: https://github.com/apache/rocketmq/pull/11040#issuecomment-5551615927
Evidence chain (audit 2026-09-05): **Before the fix** — ff8f6f74c + regression test only (production change stashed): ``` mvn -pl broker test -Dtest=ConsumerManagerTest#testWithoutSubRegistrationRemovedOnFastChannelClose Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 ``` The test uses a real `EmbeddedChannel`; `doChannelCloseEvent` returns `removed == false` and the group stays in `consumerTable`, because `ClientChannelAttributeHelper.getConsumerGroups(channel)` is empty without the attribute. **After the fix** — branch tip 755debe9d, re-measured 2026-09-05: ``` mvn -pl broker test -Dtest=ConsumerManagerTest,ConsumerManagerScannerTest,ClientManageProcessorTest Tests run: 23, Failures: 0, Errors: 0, Skipped: 0 ``` Claim verification for "a later full heartbeat on the same channel cannot repair it": `ConsumerGroupInfo#updateChannel` returns `updated = true` only when the channel is new (broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerGroupInfo.java:142-149 — for an existing channel only the clientId-mismatch branch runs, still returning false), so a full `registerConsumer` on the already-registered channel takes the `r1 = false` branch and the r1-guarded `addConsumerGroup` (ConsumerManager.java) is never reached. Verified by reading the code. -- 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]
