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 0fb57a6db88 [fix](meta) add sync new image timeout (#25768)
0fb57a6db88 is described below

commit 0fb57a6db889012e095117a5ee0fa1936fd2362c
Author: CanGuan <[email protected]>
AuthorDate: Wed Oct 25 23:46:18 2023 +0800

    [fix](meta) add sync new image timeout (#25768)
    
    Add timeout config for sync
---
 fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 9 +++++++++
 fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java     | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java 
b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
index fef83a5f62a..bbb064339f7 100644
--- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
+++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
@@ -2259,4 +2259,13 @@ public class Config extends ConfigBase {
     })
     public static boolean ignore_unknown_metadata_module = false;
 
+    @ConfField(mutable = true, masterOnly = true, description = {
+        
"FE扩容时,从主节点同步元数据的timeout时间,根据${meta_dir}/image文件夹下面的image文件大小和节点间的网络环境调整,"
+            + "单位为秒,默认值300",
+        "The timeout for new FE Follower/Observer synchronizing metadata from 
the FE Master, "
+            + "adjust by the size of image file in the ${meta_dir}/image and 
the network environment between nodes. "
+            + "The default values is 300s."
+    })
+    public static int sync_image_timeout_second = 300;
+
 }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index 8192713d7bd..8e46daaf936 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -1726,7 +1726,8 @@ public class Env {
                 String url = "http://"; + hostPort + "/image?version=" + 
version;
                 String filename = Storage.IMAGE + "." + version;
                 File dir = new File(this.imageDir);
-                MetaHelper.getRemoteFile(url, HTTP_TIMEOUT_SECOND * 1000, 
MetaHelper.getFile(filename, dir));
+                MetaHelper.getRemoteFile(url, Config.sync_image_timeout_second 
* 1000,
+                        MetaHelper.getFile(filename, dir));
                 MetaHelper.complete(filename, dir);
             } else {
                 LOG.warn("get an image with a lower version, 
localImageVersion: {}, got version: {}",


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

Reply via email to