From b8f95fb3d435842cf3b5c5a0b81eb5198c5d222b Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 14 Jul 2021 17:58:46 +0100 Subject: [PATCH] fix: Use correct replication status in replication healing (#12711) In case of replication healing, we always store completed status in the object metadata, which is wrong because replication could fail in the further retries. --- cmd/bucket-replication.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 85899514a..618945d92 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -839,7 +839,7 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje for k, v := range objInfo.UserDefined { popts.UserDefined[k] = v } - popts.UserDefined[xhttp.AmzBucketReplicationStatus] = replication.Completed.String() + popts.UserDefined[xhttp.AmzBucketReplicationStatus] = replicationStatus.String() if objInfo.UserTags != "" { popts.UserDefined[xhttp.AmzObjectTagging] = objInfo.UserTags }