This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 55170455982 branch-2.1: [chore](checkpoint) add enable_checkpoint config #45301 (#45328) 55170455982 is described below commit 55170455982e6df788d1dcf1baa6f7b27b16f505 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Tue Dec 17 20:11:51 2024 +0800 branch-2.1: [chore](checkpoint) add enable_checkpoint config #45301 (#45328) Cherry-picked from #45301 Co-authored-by: walter <maoch...@selectdb.com> --- fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 6 ++++++ fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java | 5 +++++ 2 files changed, 11 insertions(+) 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 e0f0b0064eb..1b5e412437b 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 @@ -2781,6 +2781,12 @@ public class Config extends ConfigBase { public static long auto_analyze_interval_seconds = 86400; + // A internal config to control whether to enable the checkpoint. + // + // ATTN: it only used in test environment. + @ConfField(mutable = true, masterOnly = true) + public static boolean enable_checkpoint = true; + //========================================================================== // begin of cloud config //========================================================================== diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java b/fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java index fd8ca0c7cc2..2a9ead68fc2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java +++ b/fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java @@ -85,6 +85,11 @@ public class Checkpoint extends MasterDaemon { // public for unit test, so that we can trigger checkpoint manually. // DO NOT call it manually outside the unit test. public synchronized void doCheckpoint() throws CheckpointException { + if (!Config.enable_checkpoint) { + LOG.warn("checkpoint is disabled. please enable the config 'enable_checkpoint'."); + return; + } + if (!Env.getServingEnv().isHttpReady()) { LOG.info("Http server is not ready."); return; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org