mirror of https://github.com/tikv/client-go.git
config: move resolve-lock-lite-threshold to tikv-client segment (#297)
This commit is contained in:
parent
c7f8168472
commit
4fc565e203
|
|
@ -83,6 +83,7 @@ type TiKVClient struct {
|
|||
CoprCache CoprocessorCache `toml:"copr-cache" json:"copr-cache"`
|
||||
// TTLRefreshedTxnSize controls whether a transaction should update its TTL or not.
|
||||
TTLRefreshedTxnSize int64 `toml:"ttl-refreshed-txn-size" json:"ttl-refreshed-txn-size"`
|
||||
ResolveLockLiteThreshold uint64 `toml:"resolve-lock-lite-threshold" json:"resolve-lock-lite-threshold"`
|
||||
}
|
||||
|
||||
// AsyncCommit is the config for the async commit feature. The switch to enable it is a system variable.
|
||||
|
|
@ -149,6 +150,8 @@ func DefaultTiKVClient() TiKVClient {
|
|||
AdmissionMaxResultMB: 10,
|
||||
AdmissionMinProcessMs: 5,
|
||||
},
|
||||
|
||||
ResolveLockLiteThreshold: 16,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ type Config struct {
|
|||
TxnScope string
|
||||
EnableAsyncCommit bool
|
||||
Enable1PC bool
|
||||
ResolveLockLiteThreshold uint64
|
||||
}
|
||||
|
||||
// DefaultConfig returns the default configuration.
|
||||
|
|
@ -96,7 +95,6 @@ func DefaultConfig() Config {
|
|||
TxnScope: "",
|
||||
EnableAsyncCommit: false,
|
||||
Enable1PC: false,
|
||||
ResolveLockLiteThreshold: 16,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ type LockResolver struct {
|
|||
func NewLockResolver(store storage) *LockResolver {
|
||||
r := &LockResolver{
|
||||
store: store,
|
||||
resolveLockLiteThreshold: config.GetGlobalConfig().ResolveLockLiteThreshold,
|
||||
resolveLockLiteThreshold: config.GetGlobalConfig().TiKVClient.ResolveLockLiteThreshold,
|
||||
}
|
||||
r.mu.resolved = make(map[uint64]TxnStatus)
|
||||
r.mu.recentResolved = list.New()
|
||||
|
|
|
|||
Loading…
Reference in New Issue