diff --git a/fe/src/main/java/org/apache/doris/common/Config.java b/fe/src/main/java/org/apache/doris/common/Config.java index 48cfee18c2..abed9ec822 100644 --- a/fe/src/main/java/org/apache/doris/common/Config.java +++ b/fe/src/main/java/org/apache/doris/common/Config.java @@ -119,8 +119,9 @@ public class Config extends ConfigBase { @ConfField public static int label_clean_interval_second = 4 * 3600; // 4 hours /* * the transaction will be cleaned after transaction_clean_interval_second seconds if the transaction is visible or aborted + * we should make this interval as short as possible and each clean cycle as soon as possible */ - @ConfField public static int transaction_clean_interval_second = 300; // 5 min + @ConfField public static int transaction_clean_interval_second = 30; // Configurations for meta data durability /* diff --git a/fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java b/fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java index f1b41b3750..0851d41b1e 100644 --- a/fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java +++ b/fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java @@ -821,6 +821,8 @@ public class GlobalTransactionMgr implements Writable { * The txn cleaner will run at a fixed interval and try to delete expired and timeout txns: * expired: txn is in VISIBLE or ABORTED, and is expired. * timeout: txn is in PREPARE, but timeout + * Todo(kks): currently remove transaction performance is bad, if we want to support + * super-high concurrent transaction, we should improve this method */ public void removeExpiredAndTimeoutTxns() { long currentMillis = System.currentTimeMillis();