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

   ## What is the purpose of the change
   
   Two robustness bugs in the cluster/client discovery providers that surface 
as false 502 errors or crashes:
   
   - `findConsumerConnections` threw a 502 whenever the subscription table 
contained only system groups (e.g. `%RETRY%`/`%DLQ%`), because the failure 
check compared the group count against the *successful* query count without 
accounting for skipped system groups. A cluster with no real consumer groups 
thus reported the clients endpoint as failed.
   - `RealClusterProvider.toClusterVOs` dereferenced `clusterInfo` without a 
null check, unlike the sibling `RocketMQClusterProvider` and 
`RocketMQClientProvider`; a null `examineBrokerClusterInfo()` response caused 
an NPE instead of an empty result.
   
   ## Brief changelog
   
   - Track attempted (non-system) group queries separately and only fail when 
at least one was attempted and all failed; system-only subscription tables now 
return an empty list.
   - Guard `toClusterVOs` against a null `ClusterInfo` and return an empty 
list, matching the other providers.
   - Cover both with unit tests: a system-only subscription table asserting an 
empty result with no admin calls, and a null `ClusterInfo` asserting an empty 
discovery result.
   
   ## Verifying this change
   
   - `mvn -q -Dtest=RocketMQClientProviderTest,RealClusterProviderTest 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