mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-01 17:46:55 +08:00
adjust the retry logic
This commit is contained in:
parent
b961fcd338
commit
2d519c6cb6
@ -143,6 +143,7 @@ func retriedStreamFetchChunkData(writer io.Writer, urlStrings []string, cipherKe
|
|||||||
writer.Write(data)
|
writer.Write(data)
|
||||||
written += len(data)
|
written += len(data)
|
||||||
})
|
})
|
||||||
|
shouldRetry = shouldRetry && written == 0
|
||||||
if !shouldRetry {
|
if !shouldRetry {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -155,7 +156,7 @@ func retriedStreamFetchChunkData(writer io.Writer, urlStrings []string, cipherKe
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil && shouldRetry && written > 0 {
|
if err != nil && shouldRetry {
|
||||||
glog.V(0).Infof("retry reading in %v", waitTime)
|
glog.V(0).Infof("retry reading in %v", waitTime)
|
||||||
time.Sleep(waitTime)
|
time.Sleep(waitTime)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user