mirror of
https://github.com/minio/minio.git
synced 2025-01-24 05:03:16 -05:00
fix: replication of tags while removing (#17989)
A tag removal was not being replicated prior to this change
This commit is contained in:
parent
f7ca6c63c2
commit
703ed46d79
@ -702,10 +702,8 @@ func getCopyObjMetadata(oi ObjectInfo, sc string) map[string]string {
|
||||
meta[xhttp.ContentType] = oi.ContentType
|
||||
}
|
||||
|
||||
if oi.UserTags != "" {
|
||||
meta[xhttp.AmzObjectTagging] = oi.UserTags
|
||||
meta[xhttp.AmzTagDirective] = "REPLACE"
|
||||
}
|
||||
meta[xhttp.AmzObjectTagging] = oi.UserTags
|
||||
meta[xhttp.AmzTagDirective] = "REPLACE"
|
||||
|
||||
if sc == "" {
|
||||
sc = oi.StorageClass
|
||||
@ -887,7 +885,7 @@ func getReplicationAction(oi1 ObjectInfo, oi2 minio.ObjectInfo, opType replicati
|
||||
}
|
||||
|
||||
t, _ := tags.ParseObjectTags(oi1.UserTags)
|
||||
if !reflect.DeepEqual(oi2.UserTags, t.ToMap()) || (oi2.UserTagCount != len(t.ToMap())) {
|
||||
if (oi2.UserTagCount > 0 && !reflect.DeepEqual(oi2.UserTags, t.ToMap())) || (oi2.UserTagCount != len(t.ToMap())) {
|
||||
return replicateMetadata
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user