This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 54507bb058 [fix](FQDN)fix Checkpoint error (#19678)
54507bb058 is described below

commit 54507bb0586f3b2acf7dad6e7556280b24a99f31
Author: zhangdong <[email protected]>
AuthorDate: Wed May 17 08:47:11 2023 +0800

    [fix](FQDN)fix Checkpoint error (#19678)
    
    Must use Env.getServingEnv() instead of getCurrentEnv(),because here we 
need to obtain selfNode through the official service catalog.
---
 .../src/main/java/org/apache/doris/common/util/HttpURLUtil.java       | 4 +++-
 .../src/main/java/org/apache/doris/httpv2/meta/MetaService.java       | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/common/util/HttpURLUtil.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/util/HttpURLUtil.java
index a5394d6d48..966bc6c66e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/util/HttpURLUtil.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/HttpURLUtil.java
@@ -31,7 +31,9 @@ public class HttpURLUtil {
     public static HttpURLConnection getConnectionWithNodeIdent(String request) 
throws IOException {
         URL url = new URL(request);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-        HostInfo selfNode = Env.getCurrentEnv().getSelfNode();
+        // Must use Env.getServingEnv() instead of getCurrentEnv(),
+        // because here we need to obtain selfNode through the official 
service catalog.
+        HostInfo selfNode = Env.getServingEnv().getSelfNode();
         conn.setRequestProperty(Env.CLIENT_NODE_HOST_KEY, selfNode.getHost());
         conn.setRequestProperty(Env.CLIENT_NODE_PORT_KEY, selfNode.getPort() + 
"");
         return conn;
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/httpv2/meta/MetaService.java 
b/fe/fe-core/src/main/java/org/apache/doris/httpv2/meta/MetaService.java
index 6deea9f0e4..cc0cb47a63 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/meta/MetaService.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/meta/MetaService.java
@@ -71,7 +71,7 @@ public class MetaService extends RestBaseController {
 
         Frontend fe = Env.getCurrentEnv().checkFeExist(clientHost, clientPort);
         if (fe == null) {
-            LOG.warn("request is not from valid FE. client: {}", clientHost);
+            LOG.warn("request is not from valid FE. client: {}, {}", 
clientHost, clientPortStr);
             return false;
         }
         return true;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to