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 Harshavardhana
parent d55f4336ae
commit 63e9005f01
1 changed files with 5 additions and 0 deletions

View File

@ -973,6 +973,11 @@ func (er erasureObjects) PutObjectTags(ctx context.Context, bucket, object strin
}
for i, fi := range metaArr {
if errs[i] != nil {
// Avoid disks where loading metadata fail
continue
}
// clean fi.Meta of tag key, before updating the new tags
delete(fi.Metadata, xhttp.AmzObjectTagging)
// Don't update for empty tags