123123213weqw opened a new pull request, #6388: URL: https://github.com/apache/rocketmq-dashboard/pull/6388
@lizhimins Supersedes #5770 (GitHub refuses to reopen maintainer-closed PRs, hence the fresh one) — same ordering fix, with all three review asks applied, and the branch merged onto the current `rocketmq-studio`. ## What `RocketMQClusterProvider.discoverClusters` walked `clusterAddrTable` in raw map order while `RealClusterProvider` sorts its table walk by name (`RealClusterProvider.java:133`). This sorts the discovery walk too. Per your review, `buildBrokerList` now walks a sorted copy as well — its `brokerNames` is a deserialised `HashSet`, so brokers inside each cluster were still hash-ordered while the sibling provider lists them by name (`RealClusterProvider.java:146`). ## Review asks from #5770, applied - `buildBrokerList` iterates `new TreeSet<>(brokerNames)` so the brokers inside each cluster come out in name order, matching the sibling provider. - Test renamed to `discoverClustersShouldOrderClustersByNameRegardlessOfTableOrderTest`. - Rationale softened in both the code comment and the test: the walk is deterministic for a given key set; the win is cross-provider consistency and predictable output, not stability across polls. `RocketMQClusterProviderTest` is green on this branch. Ready to merge together with the #5771 successor. -- 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]
