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

dataroaring 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 ac7678926f6 [improvement](tablet clone) add config for decommission 
tablet wait time (#26000)
ac7678926f6 is described below

commit ac7678926f697e46482d4387bba4289b19337db1
Author: yujun <yu.jun.re...@gmail.com>
AuthorDate: Tue Oct 31 20:36:26 2023 +0800

    [improvement](tablet clone) add config for decommission tablet wait time 
(#26000)
---
 fe/fe-common/src/main/java/org/apache/doris/common/Config.java   | 9 +++++++++
 .../src/main/java/org/apache/doris/clone/TabletSchedCtx.java     | 2 +-
 2 files changed, 10 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 aa9ad15edea..0daa863f8fc 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
@@ -1163,6 +1163,15 @@ public class Config extends ConfigBase {
     @ConfField(mutable = true, masterOnly = true)
     public static int decommission_tablet_check_threshold = 5000;
 
+    /**
+     * Decommission a tablet need to wait all the previous txns finished.
+     * If wait timeout, decommission will fail.
+     * Need to increase this wait time if the txn take a long time.
+     *
+     */
+    @ConfField(mutable = true, masterOnly = true)
+    public static int decommission_tablet_wait_time_seconds = 3600;
+
     /**
      * Define thrift server's server model, default is TThreadPoolServer model
      */
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java 
b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
index 11f338f1224..830b71efa0c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
@@ -305,7 +305,7 @@ public class TabletSchedCtx implements 
Comparable<TabletSchedCtx> {
             if (decommissionTime < 0) {
                 decommissionTime = System.currentTimeMillis();
             }
-            return System.currentTimeMillis() > decommissionTime + 10 * 60 * 
1000L;
+            return System.currentTimeMillis() > decommissionTime + 
Config.decommission_tablet_wait_time_seconds * 1000L;
         } else {
             decommissionTime = -1;
             if (code == SubCode.WAITING_SLOT && type != Type.BALANCE) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to