Return ETag from remote when file doesn't exist on Filer (#4025)

This commit is contained in:
aronneagu 2022-11-30 15:43:30 +00:00 committed by GitHub
parent f59c3acd5f
commit 77699855a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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())
}