From f783f88a5299a824104565277e4784e177e52843 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 (cherry picked from commit 405e96fec012bda534281aaa8488949296f0fad6) --- 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")