Skip to content

Commit

Permalink
perf: 🚀 Increase CNI Lock Timeout to 30 seconds for Linux AKS. (#2101)
Browse files Browse the repository at this point in the history
* Increase Linux Lock Timout to 30 seconds.

* addressing the comment by adding a new lock constant for Linux.
  • Loading branch information
behzad-mir authored Aug 17, 2023
1 parent 906313d commit 9a3c50c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cni/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (plugin *Plugin) InitializeKeyValueStore(config *common.PluginConfig) error
}

// Acquire store lock. For windows 1m timeout is used while for Linux 10s timeout is assigned.
var lockTimeoutValue time.Duration = store.DefaultLockTimeout
var lockTimeoutValue time.Duration = store.DefaultLockTimeoutLinux
if runtime.GOOS == "windows" {
lockTimeoutValue = store.DefaultLockTimeoutWindows
}
Expand Down
1 change: 1 addition & 0 deletions store/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const (

// DefaultLockTimeout - lock timeout in milliseconds
DefaultLockTimeout = 10000 * time.Millisecond
DefaultLockTimeoutLinux = 30000 * time.Millisecond
DefaultLockTimeoutWindows = 60000 * time.Millisecond
)

Expand Down

0 comments on commit 9a3c50c

Please sign in to comment.