aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-20 08:35:10 -0700
committerchrislu <chris.lu@gmail.com>2022-09-20 08:35:10 -0700
commitb463ca1a2f514248f20e06a3c5e1fda6fbef7d9e (patch)
tree546d604062590d5b0960661fc4a331e85828d617
parent023155bea55dfca18a6876cf1e4c269708ae08c2 (diff)
downloadseaweedfs-b463ca1a2f514248f20e06a3c5e1fda6fbef7d9e.tar.xz
seaweedfs-b463ca1a2f514248f20e06a3c5e1fda6fbef7d9e.zip
filer replication: compare content changes directly
Fix https://github.com/seaweedfs/seaweedfs/issues/3714 The destination chunks may be empty. For example, the file is updated and the volume is vacuumed. In this case, the sync would miss the old chunks. This is fine. However, the entry would have correct metadata but missing chunks. For this case, the simple metadata comparison would be wrongly skipping data changes, and the file will stay empty unless file content md5 is changed.
-rw-r--r--weed/replication/sink/filersink/filer_sink.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go
index 06c8b1cbc..816d18a02 100644
--- a/weed/replication/sink/filersink/filer_sink.go
+++ b/weed/replication/sink/filersink/filer_sink.go
@@ -187,10 +187,6 @@ func (fs *FilerSink) UpdateEntry(key string, oldEntry *filer_pb.Entry, newParent
// skip if already changed
// this usually happens when the messages are not ordered
glog.V(2).Infof("late updates %s", key)
- } else if filer.ETag(newEntry) == filer.ETag(existingEntry) {
- // skip if no change
- // this usually happens when retrying the replication
- glog.V(3).Infof("already replicated %s", key)
} else {
// find out what changed
deletedChunks, newChunks, err := compareChunks(filer.LookupFn(fs), oldEntry, newEntry)