Skip to content

Commit

Permalink
adjust timeout for orphan transactions (#17045)
Browse files Browse the repository at this point in the history
Adjust timeout for orphan transactions.

Approved by: @iamlinjunhong, @sukki37
  • Loading branch information
zhangxu19830126 authored Jun 20, 2024
1 parent f27a435 commit c531196
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/lockservice/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var (
defaultMaxFixedSliceSize = 1 << 20 * 10 // 10mb
defaultKeepRemoteLockDuration = time.Second
defaultKeepBindTimeout = time.Second * 10
defaultRemoteLockTimeout = time.Minute * 1
)

// Config lock service config
Expand Down Expand Up @@ -99,7 +100,7 @@ func (c *Config) Validate() {
c.KeepRemoteLockDuration.Duration = defaultKeepRemoteLockDuration
}
if c.RemoteLockTimeout.Duration == 0 {
c.RemoteLockTimeout.Duration = c.KeepRemoteLockDuration.Duration * 10
c.RemoteLockTimeout.Duration = defaultRemoteLockTimeout
}
if c.KeepBindTimeout.Duration == 0 {
c.KeepBindTimeout.Duration = defaultKeepBindTimeout
Expand Down

0 comments on commit c531196

Please sign in to comment.