Don't log when object to be tiered is not found (#17924)

This commit is contained in:
Krishnan Parthasarathi 2023-08-25 23:34:16 -07:00 committed by GitHub
parent 1ea7826c0e
commit 53abd25116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,8 +280,10 @@ func (t *transitionState) worker(objectAPI ObjectLayer) {
}
atomic.AddInt32(&t.activeTasks, 1)
if err := transitionObject(t.ctx, objectAPI, task.objInfo, newLifecycleAuditEvent(task.src, task.event)); err != nil {
logger.LogIf(t.ctx, fmt.Errorf("Transition to %s failed for %s/%s version:%s with %w",
task.event.StorageClass, task.objInfo.Bucket, task.objInfo.Name, task.objInfo.VersionID, err))
if !isErrVersionNotFound(err) && !isErrObjectNotFound(err) {
logger.LogIf(t.ctx, fmt.Errorf("Transition to %s failed for %s/%s version:%s with %w",
task.event.StorageClass, task.objInfo.Bucket, task.objInfo.Name, task.objInfo.VersionID, err))
}
} else {
ts := tierStats{
TotalSize: uint64(task.objInfo.Size),