Abhishekmishra2808 commented on code in PR #7970:
URL: https://github.com/apache/incubator-seata/pull/7970#discussion_r2742046155
##########
server/src/main/java/org/apache/seata/server/controller/ClusterController.java:
##########
@@ -85,18 +84,12 @@ public MetadataResponse cluster(String group) {
if (raftServer != null) {
String mode =
ConfigurationFactory.getInstance().getConfig(STORE_MODE);
metadataResponse.setStoreMode(mode);
- RouteTable routeTable = RouteTable.getInstance();
try {
-
routeTable.refreshLeader(RaftServerManager.getCliClientServiceInstance(),
group, 1000);
- PeerId leader = routeTable.selectLeader(group);
- if (leader != null) {
+ RaftClusterMetadata raftClusterMetadata =
Review Comment:
Small question: do we need a null-safety check around
`getRaftLeaderMetadata()` or its fields (leader / learners) during leader
transition windows, or is the state machine guaranteed to return a consistent
snapshot here?
--
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]