Improve reconnection logic, allow jitters. (#3502)

Attempt a reconnect also if disk not found.

This is needed since any network operation error
is converted to disk not found but we also need
to make sure if disk is really not available. 

Additionally we also need to retry more than
once because the server might be in startup
sequence which would render other servers to
wrongly think that the server is offline.
This commit is contained in:
Harshavardhana
2016-12-29 03:13:51 -08:00
committed by GitHub
parent 00baec1746
commit 41cf580bb1
7 changed files with 106 additions and 71 deletions

View File

@@ -79,13 +79,20 @@ var (
globalMinioPort = "9000"
// Holds the host that was passed using --address
globalMinioHost = ""
// Peer communication struct
globalS3Peers = s3Peers{}
// CA root certificates, a nil value means system certs pool will be used
globalRootCAs *x509.CertPool
// List of admin peers.
globalAdminPeers = adminPeers{}
// Attempt to retry only this many number of times before
// giving up on the remote disk entirely.
globalMaxStorageRetryThreshold = 3
// Add new variable global values here.
)