mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fail fast when failed to write local volume
This commit is contained in:
parent
2ff95ead57
commit
219838db87
|
@ -28,9 +28,11 @@ func ReplicatedWrite(masterNode string, s *storage.Store,
|
|||
needToReplicate := !s.HasVolume(volumeId)
|
||||
if err != nil {
|
||||
errorStatus = "Failed to write to local disk (" + err.Error() + ")"
|
||||
} else {
|
||||
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
|
||||
size = ret
|
||||
return
|
||||
}
|
||||
|
||||
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
|
||||
if !needToReplicate {
|
||||
needToReplicate = s.GetVolume(volumeId).NeedToReplicate()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue