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

   ## What is the purpose of the change
   
   Two data-correctness bugs in the read paths that the AI tool catalog and 
dashboard rely on:
   
   - `RocketMQMetadataProvider.listConsumerGroups` never set 
`ConsumerGroupVO.subscriptionMode`, so the AI `rmq.group.list` tool threw 
`IllegalStateException` (500) for every group, and the web detail never showed 
the subscription mode.
   - `RocketMQDashboardProvider` could NPE when a master broker appeared in the 
broker table but in no `clusterAddrTable` set (a registration/unregistration 
race), silently dropping that broker's topic counts. The consumer-group path 
already guarded this; the topic path did not.
   
   ## Brief changelog
   
   - Map the stored `messageModel` ("Push"/"Pop") onto `subscriptionMode` in 
`listConsumerGroups`, with a `parseSubscriptionMode` helper symmetric to 
`parseConsumeType`.
   - Guard the per-cluster topic count against a null cluster name in the 
dashboard, counting orphan-broker topics globally while skipping the 
per-cluster bucket, matching the group path.
   - Cover both with unit tests: Push/Pop subscription mapping, and an orphan 
broker whose topics are still counted without an NPE.
   
   ## Verifying this change
   
   - `mvn -q -Dtest=RocketMQMetadataProviderTest,RocketMQDashboardProviderTest 
test`
   - `mvn -q test` (1056/1056)
   - `git diff --check`
   


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