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

   ## What
   
   `RocketMQMetadataProvider.getTopicRoutes` copies the route's queue list into
   the `BrokerRouteVO` list in the order the NameServer returned it. The queue
   datas of a route are rebuilt from a hash table per snapshot, so that order is
   not stable: the topic route table can reshuffle its rows between two views of
   the same topic.
   
   The queue-stats view on the same screen already sorts by broker name (then
   queue id); the route view did not.
   
   ## Fix
   
   Sort the queue datas by broker name before building the route rows so the
   route listing is stable and consistent with the stats table.
   
   ## Test
   
   `getTopicRoutesShouldOrderRoutesByBrokerName` feeds a route whose queue list
   is deliberately reverse-alphabetical and asserts the rows come out ordered by
   broker name. 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