This is an automated email from the ASF dual-hosted git repository. lide 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 68cae7e7251 [bug](branch2.0) Fix modifying label_num_threshold does not take effect #34576 68cae7e7251 is described below commit 68cae7e7251a18cb54c58c719eb7d5f733909c58 Author: xy720 <22125576+xy...@users.noreply.github.com> AuthorDate: Thu May 9 19:08:53 2024 +0800 [bug](branch2.0) Fix modifying label_num_threshold does not take effect #34576 --- fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 6 ++++-- .../org/apache/doris/transaction/DatabaseTransactionMgr.java | 9 ++------- 2 files changed, 6 insertions(+), 9 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 61692471964..c1c03754c99 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 @@ -2341,10 +2341,12 @@ public class Config extends ConfigBase { public static int http_load_submitter_max_worker_threads = 2; @ConfField(mutable = true, masterOnly = true, description = { - "load label个数阈值,超过该个数后,对于已经完成导入作业或者任务,其label会被删除,被删除的 label 可以被重用。", + "load label个数阈值,超过该个数后,对于已经完成导入作业或者任务," + + "其label会被删除,被删除的 label 可以被重用。 值为 -1 时,表示此阈值不生效。", "The threshold of load labels' number. After this number is exceeded, " + "the labels of the completed import jobs or tasks will be deleted, " - + "and the deleted labels can be reused." + + "and the deleted labels can be reused. " + + "When the value is -1, it indicates no threshold." }) public static int label_num_threshold = 2000; diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java index 7be0c1f841e..8c9000cee7f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java @@ -166,8 +166,6 @@ public class DatabaseTransactionMgr { private long lockReportingThresholdMs = Config.lock_reporting_threshold_ms; - private long maxFinalTxnsNum = Long.MAX_VALUE; - protected void readLock() { this.transactionLock.readLock().lock(); } @@ -191,9 +189,6 @@ public class DatabaseTransactionMgr { this.env = env; this.idGenerator = idGenerator; this.editLog = env.getEditLog(); - if (Config.label_num_threshold >= 0) { - this.maxFinalTxnsNum = Config.label_num_threshold; - } } public long getDbId() { @@ -1580,8 +1575,8 @@ public class DatabaseTransactionMgr { break; } } - while (finalStatusTransactionStateDeque.size() > maxFinalTxnsNum - && numOfClearedTransaction < left) { + while ((Config.label_num_threshold > 0 && finalStatusTransactionStateDeque.size() > Config.label_num_threshold) + && numOfClearedTransaction < left) { TransactionState transactionState = finalStatusTransactionStateDeque.getFirst(); if (transactionState.getFinishTime() != -1) { finalStatusTransactionStateDeque.pop(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org