diff --git a/pkg/types/types.go b/pkg/types/types.go index d63d53f..1248163 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -22,6 +22,24 @@ const ( ShallowCopyStateComplete = "complete" ShallowCopyStateError = "error" + ExecuteTimeout = 60 * time.Second +) + +const ( + // Sequence of Events: + // 1. Issuing I/O Command: The system sends a read command to the NVMe SSD. + // 2. Waiting for ACK: The system waits for an acknowledgment from the NVMe SSD. + // 3. Timeout: If no ACK is received within 2^transport_ack_timeout milliseconds, + // the system considers the I/O operation as a failure and attempts to resend it. + // 4. Fast I/O Failure: If multiple retries fail consecutively and the total elapsed + // time exceeds fast_io_fail_timeout_sec seconds, the system determines that the I/O + // operation is stuck and takes further actions, such as raising an alarm or switching + // to a backup path. + // 5. Controller Loss: If the NVMe SSD does not respond at all for more than + // ctrlr_loss_timeout_sec seconds, the system considers the controller as lost. + // 6. Reconnect Attempt: The system attempts to reconnect to the NVMe SSD every + // 2Reconnect_Delay_Sec seconds. + DefaultCtrlrLossTimeoutSec = 15 // DefaultReconnectDelaySec can't be more than DefaultFastIOFailTimeoutSec. DefaultReconnectDelaySec = 2 @@ -29,15 +47,13 @@ const ( // DefaultTransportAckTimeout value is not the timeout second. // The timeout formula is 2^(transport_ack_timeout) msec. - // DefaultTransportAckTimeout is 14, so the default timeout is 2^14 = 16384 msec = 16.384 sec. + // DefaultTransportAckTimeout is set to 10, so the default timeout is 2^10 = 1024 msec = 1.024 sec. // By default, error detection on a qpair is very slow for TCP transports. For fast error // detection, transport_ack_timeout should be set. - DefaultTransportAckTimeout = 14 + DefaultTransportAckTimeout = 10 DefaultKeepAliveTimeoutMs = 10000 DefaultMultipath = "disable" - - ExecuteTimeout = 60 * time.Second ) func GetNQN(name string) string {