From 53abd25116eb9dda721cd69b8e546146b8e37a23 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Fri, 25 Aug 2023 23:34:16 -0700 Subject: [PATCH] Don't log when object to be tiered is not found (#17924) --- cmd/bucket-lifecycle.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/bucket-lifecycle.go b/cmd/bucket-lifecycle.go index 9ad879f7a..78f6b292c 100644 --- a/cmd/bucket-lifecycle.go +++ b/cmd/bucket-lifecycle.go @@ -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),