Decrease transaction_clean_interval_second config (#2673)
This commit is contained in:
@ -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
|
||||
/*
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user