Decrease transaction_clean_interval_second config (#2673)

This commit is contained in:
kangkaisen
2020-01-06 20:16:37 +08:00
committed by ZHAO Chun
parent 9ca7fdfe1c
commit 40c8bddd24
2 changed files with 4 additions and 1 deletions

View File

@ -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
/*

View File

@ -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();