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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
ensure no writes to remote storage if content is not changed
Chris Lu72eb6d5b9da9
diff --git a/weed/command/filer_remote_sync.go b/weed/command/filer_remote_sync.goindex 4ee34854bd..c2f97cc6c4 100644--- a/weed/command/filer_remote_sync.go+++ b/weed/command/filer_remote_sync.go@@ -176,7 +176,6 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sourif resp.Directory == message.NewParentPath && message.OldEntry.Name == message.NewEntry.Name {if filer.IsSameData(message.OldEntry, message.NewEntry) {glog.V(2).Infof("update meta: %+v", resp)- glog.V(0).Infof("delete %s", remote_storage.FormatLocation(dest))return client.UpdateFileMetadata(dest, message.OldEntry, message.NewEntry)}}diff --git a/weed/filer/stream.go b/weed/filer/stream.goindex 2a3870aacc..9f28056cd8 100644--- a/weed/filer/stream.go+++ b/weed/filer/stream.go@@ -3,7 +3,6 @@ package filerimport ("bytes""fmt"- "github.com/golang/protobuf/proto""io""math""sort"@@ -39,9 +38,14 @@ func isSameChunks(a, b []*filer_pb.FileChunk) bool {if len(a) != len(b) {return false}+ sort.Slice(a, func(i, j int) bool {+ return strings.Compare(a[i].ETag, a[j].ETag) < 0+ })+ sort.Slice(b, func(i, j int) bool {+ return strings.Compare(b[i].ETag, b[j].ETag) < 0+ })for i := 0; i < len(a); i++ {- x, y := a[i], b[i]- if !proto.Equal(x, y) {+ if a[i].ETag != b[i].ETag {return false}}