From 2464a22ac53b31303837dcf9e8cdd1497d2ecc63 Mon Sep 17 00:00:00 2001 From: luozenglin Date: Fri, 27 Oct 2023 16:58:42 +0800 Subject: [PATCH] [fix](meta) fix follower sync image timeout after checkpoint. (#26003) The image file of our cluster reaches 2.3G. After the checkpoint, Followers synchronize the image timeout, resulting in the continuous increase of the bdb directory. related pr: #25768 --- .../src/main/java/org/apache/doris/common/Config.java | 10 +++++----- .../java/org/apache/doris/httpv2/meta/MetaService.java | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) 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 c9b75cb84f..c4e7c1b3d4 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 @@ -2260,11 +2260,11 @@ 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." + "从主节点同步image文件的超时时间,用户可根据${meta_dir}/image文件夹下面的image文件大小和节点间的网络环境调整," + + "单位为秒,默认值300", + "The timeout for FE Follower/Observer synchronizing an image file from the FE Master, can be adjusted by " + + "the user on the size of image file in the ${meta_dir}/image and the network environment between " + + "nodes. The default values is 300." }) public static int sync_image_timeout_second = 300; 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 ce71581f5c..65a3ac8d2e 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 @@ -49,8 +49,6 @@ import javax.servlet.http.HttpServletResponse; public class MetaService extends RestBaseController { private static final Logger LOG = LogManager.getLogger(MetaService.class); - private static final int TIMEOUT_SECOND = 10; - private static final String VERSION = "version"; private static final String HOST = "host"; private static final String PORT = "port"; @@ -162,7 +160,7 @@ public class MetaService extends RestBaseController { String filename = Storage.IMAGE + "." + versionStr; File dir = new File(Env.getCurrentEnv().getImageDir()); try { - MetaHelper.getRemoteFile(url, TIMEOUT_SECOND * 1000, MetaHelper.getFile(filename, dir)); + MetaHelper.getRemoteFile(url, Config.sync_image_timeout_second * 1000, MetaHelper.getFile(filename, dir)); MetaHelper.complete(filename, dir); } catch (FileNotFoundException e) { return ResponseEntityBuilder.notFound("file not found.");