yinzhijian commented on code in PR #16315:
URL: https://github.com/apache/doris/pull/16315#discussion_r1122550677


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -942,24 +945,13 @@ private void getClusterIdAndRole() throws IOException {
                     // But we will get a empty nodeName after upgrading.
                     // So for forward compatibility, we use the "old-style" 
way of naming: "ip_port",
                     // and update the ROLE file.
-                    nodeName = genFeNodeName(selfNode.first, selfNode.second, 
true/* old style */);
+                    nodeName = genFeNodeName(selfNode.getIp(), 
selfNode.getPort(), true/* old style */);
                     storage.writeFrontendRoleAndNodeName(role, nodeName);
                     LOG.info("forward compatibility. role: {}, node name: {}", 
role.name(), nodeName);
-                } else {
-                    // nodeName should be like "192.168.1.1_9217_1620296111213"
-                    // and the selfNode should be the prefix of nodeName.
-                    // If not, it means that the ip used last time is 
different from this time, which is not allowed.
-                    // But is metadata_failure_recovery is true,
-                    // we will not check it because this may be a FE migration.
-                    String[] split = nodeName.split("_");
-                    if (Config.metadata_failure_recovery.equals("false") && 
!selfNode.first.equalsIgnoreCase(
-                            split[0])) {
-                        throw new IOException(
-                                "the self host " + selfNode.first + " does not 
equal to the host in ROLE" + " file "
-                                        + split[0] + ". You need to set 
'priority_networks' config"
-                                        + " in fe.conf to match the host " + 
split[0]);
-                    }
                 }
+                // Notice:

Review Comment:
   If enable_fqdn_mode has been enabled and nodename is already in hostname 
format, disabling enable_fqdn_mode will result in consistency check failure and 
startup failure.



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