Avoid logging errors twice during transitioned objects expiration (#17782)

This commit is contained in:
Anis Eleuch 2023-08-02 17:06:03 +01:00 committed by GitHub
parent 21cdd2bf5d
commit 1664fd8bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -403,13 +403,11 @@ func expireTransitionedObject(ctx context.Context, objectAPI ObjectLayer, oi *Ob
TierName: oi.TransitionedObject.Tier,
}
if err := globalTierJournal.AddEntry(entry); err != nil {
logger.LogIf(ctx, err)
return err
}
// Delete metadata on source, now that data in remote tier has been
// marked for deletion.
if _, err := objectAPI.DeleteObject(ctx, oi.Bucket, oi.Name, opts); err != nil {
logger.LogIf(ctx, err)
return err
}