From 0e9215bfe9f7cca711c54c754b5287c72b6e5d11 Mon Sep 17 00:00:00 2001 From: Eric Weber Date: Wed, 21 Aug 2024 19:07:06 +0000 Subject: [PATCH] feat(timeout): make engineReplicaTimeoutLong double engineReplicaTimeoutShort Longhorn 8711 Signed-off-by: Eric Weber --- app/cmd/controller.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/cmd/controller.go b/app/cmd/controller.go index aab765b50..4bf0784a7 100644 --- a/app/cmd/controller.go +++ b/app/cmd/controller.go @@ -145,10 +145,10 @@ func startController(c *cli.Context) error { timeout := c.Int64("engine-replica-timeout") engineReplicaTimeoutShort := time.Duration(timeout) * time.Second engineReplicaTimeoutShort = controller.DetermineEngineReplicaTimeout(engineReplicaTimeoutShort) - // At the conclusion of https://github.com/longhorn/longhorn/issues/8711 we should have a strategy for determining - // engineReplicaTimeoutLong. For now, we set it to engineReplicaTimeoutShort to maintain existing behavior and - // modify it here for testing. - engineReplicaTimeoutLong := engineReplicaTimeoutShort + // In https://github.com/longhorn/longhorn/issues/8711 we decided to allow the last replica twice as long as the + // others before a timeout. We can optionally adjust this strategy (e.g. to a fixed sixty seconds or some + // configurable value) in the future. + engineReplicaTimeoutLong := 2 * engineReplicaTimeoutShort iscsiTargetRequestTimeout := controller.DetermineIscsiTargetRequestTimeout(engineReplicaTimeoutLong) snapshotMaxCount := c.Int("snapshot-max-count")