aboutsummaryrefslogtreecommitdiff
path: root/weed/replication
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-08 08:12:00 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-08 08:12:00 -0700
commitec2eb8bc4804f9b880f256a55e3cbfc0923b6a29 (patch)
treee0484d192fd361f1a0039492bcfffd75de1567db /weed/replication
parent2d7d4b1006a8cd1f7af6244672541e9ac16bfac9 (diff)
downloadseaweedfs-ec2eb8bc4804f9b880f256a55e3cbfc0923b6a29.tar.xz
seaweedfs-ec2eb8bc4804f9b880f256a55e3cbfc0923b6a29.zip
add If-None-Match and If-Modified-Since
fix https://github.com/chrislusf/seaweedfs/issues/1269
Diffstat (limited to 'weed/replication')
-rw-r--r--weed/replication/sink/filersink/filer_sink.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go
index 5f055f9d1..fa9cc0f05 100644
--- a/weed/replication/sink/filersink/filer_sink.go
+++ b/weed/replication/sink/filersink/filer_sink.go
@@ -90,7 +90,7 @@ func (fs *FilerSink) CreateEntry(key string, entry *filer_pb.Entry) error {
}
glog.V(1).Infof("lookup: %v", lookupRequest)
if resp, err := filer_pb.LookupEntry(client, lookupRequest); err == nil {
- if filer2.ETag(resp.Entry.Chunks) == filer2.ETag(entry.Chunks) {
+ if filer2.ETag(resp.Entry) == filer2.ETag(entry) {
glog.V(0).Infof("already replicated %s", key)
return nil
}
@@ -160,7 +160,7 @@ 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(0).Infof("late updates %s", key)
- } else if filer2.ETag(newEntry.Chunks) == filer2.ETag(existingEntry.Chunks) {
+ } else if filer2.ETag(newEntry) == filer2.ETag(existingEntry) {
// skip if no change
// this usually happens when retrying the replication
glog.V(0).Infof("already replicated %s", key)