@@ -75,6 +75,7 @@ const (
75
75
defaultChecksumTableConcurrency = 2
76
76
defaultTableConcurrency = 6
77
77
defaultIndexConcurrency = 2
78
+ defaultEnableAsyncCommit = "ON"
78
79
79
80
// defaultMetaSchemaName is the default database name used to store lightning metadata
80
81
defaultMetaSchemaName = "lightning_metadata"
@@ -134,6 +135,7 @@ type DBStore struct {
134
135
BuildStatsConcurrency int `toml:"build-stats-concurrency" json:"build-stats-concurrency"`
135
136
IndexSerialScanConcurrency int `toml:"index-serial-scan-concurrency" json:"index-serial-scan-concurrency"`
136
137
ChecksumTableConcurrency int `toml:"checksum-table-concurrency" json:"checksum-table-concurrency"`
138
+ EnableAsyncCommit string `toml:"enable-async-commit" json:"enable-async-commit"`
137
139
Vars map [string ]string `toml:"-" json:"vars"`
138
140
}
139
141
@@ -712,6 +714,7 @@ func NewConfig() *Config {
712
714
DistSQLScanConcurrency : defaultDistSQLScanConcurrency ,
713
715
IndexSerialScanConcurrency : defaultIndexSerialScanConcurrency ,
714
716
ChecksumTableConcurrency : defaultChecksumTableConcurrency ,
717
+ EnableAsyncCommit : defaultEnableAsyncCommit ,
715
718
},
716
719
Cron : Cron {
717
720
SwitchMode : Duration {Duration : 5 * time .Minute },
@@ -1045,6 +1048,9 @@ func (cfg *Config) DefaultVarsForImporterAndLocalBackend() {
1045
1048
if cfg .TiDB .ChecksumTableConcurrency == 0 {
1046
1049
cfg .TiDB .ChecksumTableConcurrency = defaultChecksumTableConcurrency
1047
1050
}
1051
+ if len (cfg .TiDB .EnableAsyncCommit ) == 0 {
1052
+ cfg .TiDB .EnableAsyncCommit = defaultEnableAsyncCommit
1053
+ }
1048
1054
}
1049
1055
1050
1056
func (cfg * Config ) CheckAndAdjustTiDBPort (ctx context.Context , mustHaveInternalConnections bool ) error {
0 commit comments