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)
|
needToReplicate := !s.HasVolume(volumeId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorStatus = "Failed to write to local disk (" + err.Error() + ")"
|
errorStatus = "Failed to write to local disk (" + err.Error() + ")"
|
||||||
} else {
|
size = ret
|
||||||
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
|
||||||
if !needToReplicate {
|
if !needToReplicate {
|
||||||
needToReplicate = s.GetVolume(volumeId).NeedToReplicate()
|
needToReplicate = s.GetVolume(volumeId).NeedToReplicate()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue