Skip to content

Commit 9a3c50c

Browse files
authored
perf: 🚀 Increase CNI Lock Timeout to 30 seconds for Linux AKS. (#2101)
* Increase Linux Lock Timout to 30 seconds. * addressing the comment by adding a new lock constant for Linux.
1 parent 906313d commit 9a3c50c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cni/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (plugin *Plugin) InitializeKeyValueStore(config *common.PluginConfig) error
194194
}
195195

196196
// Acquire store lock. For windows 1m timeout is used while for Linux 10s timeout is assigned.
197-
var lockTimeoutValue time.Duration = store.DefaultLockTimeout
197+
var lockTimeoutValue time.Duration = store.DefaultLockTimeoutLinux
198198
if runtime.GOOS == "windows" {
199199
lockTimeoutValue = store.DefaultLockTimeoutWindows
200200
}

store/json.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const (
2424

2525
// DefaultLockTimeout - lock timeout in milliseconds
2626
DefaultLockTimeout = 10000 * time.Millisecond
27+
DefaultLockTimeoutLinux = 30000 * time.Millisecond
2728
DefaultLockTimeoutWindows = 60000 * time.Millisecond
2829
)
2930

0 commit comments

Comments
 (0)