mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
treat 0 sized file as normal
fix https://github.com/chrislusf/seaweedfs/issues/409
This commit is contained in:
parent
03f50180f3
commit
4433b4c006
|
@ -28,12 +28,10 @@ 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 if ret > 0 {
|
|
||||||
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
|
|
||||||
} else {
|
} else {
|
||||||
errorStatus = "Failed to write to local disk"
|
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
|
||||||
}
|
}
|
||||||
if !needToReplicate && ret > 0 {
|
if !needToReplicate {
|
||||||
needToReplicate = s.GetVolume(volumeId).NeedToReplicate()
|
needToReplicate = s.GetVolume(volumeId).NeedToReplicate()
|
||||||
}
|
}
|
||||||
if needToReplicate { //send to other replica locations
|
if needToReplicate { //send to other replica locations
|
||||||
|
|
Loading…
Reference in a new issue