rpc: Our rpcClient should make an attempt to reconnect. (#3221)

rpcClient should attempt a reconnect if the call fails
with 'rpc.ErrShutdown' this is needed since at times when
the servers are taken down and brought back up.

The hijacked connection from net.Dial is usually closed.

So upon first attempt rpcClient might falsely indicate that
disk to be down, to avoid this state make another dial attempt
to really fail.

Fixes #3206
Fixes #3205
This commit is contained in:
Harshavardhana
2016-11-10 07:44:41 -08:00
committed by GitHub
parent cf2fb30ac7
commit 2f7fb78692
9 changed files with 31 additions and 56 deletions

View File

@@ -639,7 +639,7 @@ func (s *posix) createFile(volume, path string) (f *os.File, err error) {
}
// PrepareFile - run prior actions before creating a new file for optimization purposes
// Currenty we use fallocate when available to avoid disk fragmentation as much as possible
// Currently we use fallocate when available to avoid disk fragmentation as much as possible
func (s *posix) PrepareFile(volume, path string, fileSize int64) (err error) {
// It doesn't make sense to create a negative-sized file