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.
This commit is contained in:
Anis Elleuch 2021-07-14 17:58:46 +01:00 committed by GitHub
parent a4b8928660
commit b8f95fb3d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}