Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

treat 0 sized file as normal

Chris Lu4433b4c006ff
diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go
index 1163c68d23..42ad5bf107 100644
--- a/weed/topology/store_replicate.go
+++ b/weed/topology/store_replicate.go
@@ -28,12 +28,10 @@ func ReplicatedWrite(masterNode string, s *storage.Store,
needToReplicate := !s.HasVolume(volumeId)
if err != nil {
errorStatus = "Failed to write to local disk (" + err.Error() + ")"
- } else if ret > 0 {
- needToReplicate = needToReplicate || s.GetVolume(volumeId).NeedToReplicate()
} 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()
}
if needToReplicate { //send to other replica locations