123123213weqw opened a new pull request, #5771:
URL: https://github.com/apache/rocketmq-dashboard/pull/5771

   ## What
   
   `RocketMQDashboardProvider.collectDashboardData` builds the per-cluster
   overview list by iterating the NameServer `clusterAddrTable` directly. That
   table is a deserialized `HashMap`, so its iteration order varies per snapshot
   and the dashboard's cluster overview list can reorder itself between polls.
   
   The cluster list endpoint had the same defect and sorts by name
   (`RealClusterProvider`, and `RocketMQClusterProvider` after #5770); the
   dashboard overview did not.
   
   ## Fix
   
   Sort the `clusterAddrTable` entries by cluster name before building the
   `ClusterOverviewVO` list so the overview is stable across snapshots and
   consistent with the cluster list.
   
   ## Test
   
   `dashboardClusterOverviewShouldOrderClustersByName` feeds a topology whose
   table insertion order is reverse-alphabetical and asserts the overview list 
is
   name-ordered. Red on the current code, green after the sort.


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