PeppaO commented on code in PR #7069:
URL: https://github.com/apache/incubator-seata/pull/7069#discussion_r1898840860


##########
discovery/seata-discovery-raft/src/main/java/org/apache/seata/discovery/registry/raft/RaftRegistryServiceImpl.java:
##########
@@ -276,9 +294,82 @@ private static boolean isTokenExpired() {
         return System.currentTimeMillis() >= tokenExpiredTime;
     }
 
-    private InetSocketAddress convertInetSocketAddress(Node node) {
-        Node.Endpoint endpoint = node.getTransaction();
-        return new InetSocketAddress(endpoint.getHost(), endpoint.getPort());
+    private static String selectControlEndpointStr(Node node) {
+        InetSocketAddress control = selectControlEndpoint(node);
+        return NetUtil.toStringAddress(control);
+    }
+
+    private static String selectTransactionEndpointStr(Node node) {
+        InetSocketAddress transaction = selectTransactionEndpoint( node);
+        return NetUtil.toStringAddress(transaction);
+    }
+
+    private static InetSocketAddress selectControlEndpoint(Node node) {
+        return selectEndpoint("control", node);
+    }
+
+    private static InetSocketAddress selectTransactionEndpoint(Node node) {
+        return selectEndpoint("transaction", node);
+    }
+
+    private static InetSocketAddress selectEndpoint(String type, Node node) {
+        if (StringUtils.isBlank(PREFERRED_NETWORKS)) {

Review Comment:
   done



##########
server/src/main/java/org/apache/seata/server/cluster/raft/sync/msg/dto/RaftClusterMetadata.java:
##########
@@ -55,6 +58,10 @@ public Node createNode(String host, int txPort, int 
internalPort, int controlPor
         node.setGroup(group);
         node.setVersion(Version.getCurrent());
         node.setInternal(node.createEndpoint(host, internalPort, "raft"));
+        String serverRegistryMetadataExternalValue = 
System.getProperty("SERVER_REGISTRY_METADATA_EXTERNAL_VALUE");

Review Comment:
   <img width="892" alt="image" 
src="https://github.com/user-attachments/assets/446ddd3d-9195-422d-8274-6ef820027b0b";
 />
   



##########
server/src/main/java/org/apache/seata/server/cluster/raft/sync/msg/dto/RaftClusterMetadata.java:
##########
@@ -55,6 +58,10 @@ public Node createNode(String host, int txPort, int 
internalPort, int controlPor
         node.setGroup(group);
         node.setVersion(Version.getCurrent());
         node.setInternal(node.createEndpoint(host, internalPort, "raft"));
+        String serverRegistryMetadataExternalValue = 
System.getProperty("SERVER_REGISTRY_METADATA_EXTERNAL_VALUE");

Review Comment:
   done



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

Reply via email to