aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraronneagu <aronneagu@users.noreply.github.com>2022-11-30 15:43:30 +0000
committerGitHub <noreply@github.com>2022-11-30 07:43:30 -0800
commit77699855a786af677aba352a4ab0bef5091f0944 (patch)
treefc862a063e0acbdfc604ec5e487563505a8af205
parentf59c3acd5f3619f7377726effd03d7f3da98817b (diff)
downloadseaweedfs-77699855a786af677aba352a4ab0bef5091f0944.tar.xz
seaweedfs-77699855a786af677aba352a4ab0bef5091f0944.zip
Return ETag from remote when file doesn't exist on Filer (#4025)
-rw-r--r--weed/filer/filechunks.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go
index de57a0532..061e0757a 100644
--- a/weed/filer/filechunks.go
+++ b/weed/filer/filechunks.go
@@ -42,6 +42,9 @@ func ETag(entry *filer_pb.Entry) (etag string) {
}
func ETagEntry(entry *Entry) (etag string) {
+ if entry.IsInRemoteOnly() {
+ return entry.Remote.RemoteETag
+ }
if entry.Attr.Md5 == nil {
return ETagChunks(entry.GetChunks())
}