mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Implement an offline mode for a distributed node (#4646)
Implement an offline mode for remote storage to cache the offline status of a node in order to prevent network calls that are bound to fail. After a time interval an attempt will be made to restore the connection and mark the node as online if successful. Fixes #4183
This commit is contained in:
committed by
Harshavardhana
parent
1978b9d8f9
commit
98b62cbec8
@@ -341,6 +341,7 @@ func waitForFormatXLDisks(firstDisk bool, endpoints EndpointList, storageDisks [
|
||||
maxRetryAttempts: globalStorageInitRetryThreshold,
|
||||
retryUnit: time.Second,
|
||||
retryCap: time.Second * 30, // 30 seconds.
|
||||
offlineTimestamp: UTCNow(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +362,7 @@ func waitForFormatXLDisks(firstDisk bool, endpoints EndpointList, storageDisks [
|
||||
maxRetryAttempts: globalStorageRetryThreshold,
|
||||
retryUnit: time.Millisecond,
|
||||
retryCap: time.Millisecond * 5, // 5 milliseconds.
|
||||
offlineTimestamp: UTCNow(), // Set timestamp to prevent immediate marking as offline
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user