fix: Avoid updating object tags on failed disks (#9819)

This commit is contained in:
Anis Elleuch
2020-06-14 18:50:40 +01:00
committed by GitHub
parent 068ad33c9a
commit 6105cc6ab4

View File

@@ -1021,6 +1021,10 @@ func (xl xlObjects) PutObjectTags(ctx context.Context, bucket, object string, ta
}
for i, xlMeta := range metaArr {
if errs[i] != nil {
// Avoid disks where loading metadata fail
continue
}
// clean xlMeta.Meta of tag key, before updating the new tags
delete(xlMeta.Meta, xhttp.AmzObjectTagging)
// Don't update for empty tags