Browse Source
fail fast when failed to write local volume
pull/834/head
bingoohuang
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
weed/topology/store_replicate.go
|
@ -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 { |
|
|
|
|
|
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate() |
|
|
|
|
|
|
|
|
size = ret |
|
|
|
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate() |
|
|
if !needToReplicate { |
|
|
if !needToReplicate { |
|
|
needToReplicate = s.GetVolume(volumeId).NeedToReplicate() |
|
|
needToReplicate = s.GetVolume(volumeId).NeedToReplicate() |
|
|
} |
|
|
} |
|
|