Sumit6307 opened a new pull request, #7970: URL: https://github.com/apache/incubator-seata/pull/7970
## What's changed - Remove `RouteTable.refreshLeader()` and `RouteTable.selectLeader()` from `GET /metadata/v1/cluster` in `ClusterController`. - Use only `RaftStateMachine.getRaftLeaderMetadata()` for cluster metadata (leader, followers, learners, term). - Remove unused `PeerId` import. ## Why The cluster endpoint already builds the response from `RaftStateMachine.getRaftLeaderMetadata()`. The `refreshLeader`/`selectLeader` calls only checked "is there a leader?" via JRaft's RouteTable, duplicating info we already have. Removing them: - Drops the extra JRaft round-trip on every `/cluster` call - Keeps the same `MetadataResponse` shape and semantics - Leaves `changeCluster` unchanged (still uses RouteTable for `changePeers`/`updateConfiguration`) ## Testing - `ClusterControllerTest` (run `mvn test -pl server -Dtest=ClusterControllerTest`) - No changes to `RaftRegistryServiceImpl` or other callers; response contract unchanged. fix #7967 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
