From 483b226cc13b11ea402538cf5412cbee1c2809db Mon Sep 17 00:00:00 2001 From: Allan Roger Reid Date: Wed, 29 Mar 2023 15:02:45 -0700 Subject: [PATCH] fix: avoid logging when object/version not found in replication (#16919) --- cmd/bucket-replication.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 4d794b4fe..deaec4ef0 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -508,7 +508,6 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectReplicationInfo, obj VersionSuspended: globalBucketVersioningSys.Suspended(bucket), }) if err != nil && !isErrVersionNotFound(err) { // VersionNotFound would be reported by pool that object version is missing on. - logger.LogIf(ctx, fmt.Errorf("Unable to update replication metadata for %s/%s(%s): %s", bucket, dobj.ObjectName, versionID, err)) sendEvent(eventArgs{ BucketName: bucket, Object: ObjectInfo{ @@ -1005,10 +1004,7 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje }, } - if _, err = objectAPI.PutObjectMetadata(ctx, bucket, object, popts); err != nil { - logger.LogIf(ctx, fmt.Errorf("Unable to update replication metadata for %s/%s(%s): %w", - bucket, objInfo.Name, objInfo.VersionID, err)) - } + _, _ = objectAPI.PutObjectMetadata(ctx, bucket, object, popts); opType := replication.MetadataReplicationType if rinfos.Action() == replicateAll { opType = replication.ObjectReplicationType