This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new ba1f2600306 [improvement](tablet clone) add config for decommission tablet wait time (#26000) (#26342) ba1f2600306 is described below commit ba1f2600306715a2f092f87dffe6e2272bd5cf3b Author: yujun <yu.jun.re...@gmail.com> AuthorDate: Fri Nov 3 12:26:26 2023 +0800 [improvement](tablet clone) add config for decommission tablet wait time (#26000) (#26342) --- 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 06a3911c1f8..74c6de0b4e5 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 e41b4ee27b8..b505bd70427 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