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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new f7725f196e9 branch-3.0: [chore](checkpoint) add enable_checkpoint 
config #45301 (#45327)
f7725f196e9 is described below

commit f7725f196e99d6520b9ab8c534f212aa160fa67e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Dec 17 20:11:22 2024 +0800

    branch-3.0: [chore](checkpoint) add enable_checkpoint config #45301 (#45327)
    
    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 8e1e4ecced5..ba2de157206 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
@@ -2914,6 +2914,12 @@ public class Config extends ConfigBase {
     })
     public static long auto_analyze_interval_seconds = 86400; // 24 hours.
 
+    // 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 4934f8fb0b3..d3e133fda84 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
@@ -86,6 +86,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

Reply via email to