Skip to content

Commit

Permalink
feat(timeout): make engineReplicaTimeoutLong double engineReplicaTime…
Browse files Browse the repository at this point in the history
…outShort

Longhorn 8711

Signed-off-by: Eric Weber <eric.weber@suse.com>
  • Loading branch information
ejweber authored and mergify[bot] committed Aug 23, 2024
1 parent bbf32e0 commit 405e96f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/cmd/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 405e96f

Please sign in to comment.