replication: Include replica object versions for resync (#15427)

This commit is contained in:
Poorna 2022-07-28 13:43:02 -07:00 committed by GitHub
parent 2f1ef02d35
commit 5e0776e96a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1805,6 +1805,7 @@ func (c replicationConfig) Resync(ctx context.Context, oi ObjectInfo, dsc *Repli
objInfo.VersionPurgeStatusInternal = "" objInfo.VersionPurgeStatusInternal = ""
objInfo.ReplicationStatus = "" objInfo.ReplicationStatus = ""
objInfo.VersionPurgeStatus = "" objInfo.VersionPurgeStatus = ""
delete(objInfo.UserDefined, xhttp.AmzBucketReplicationStatus)
resyncdsc := mustReplicate(ctx, oi.Bucket, oi.Name, getMustReplicateOptions(objInfo, replication.ExistingObjectReplicationType, ObjectOptions{})) resyncdsc := mustReplicate(ctx, oi.Bucket, oi.Name, getMustReplicateOptions(objInfo, replication.ExistingObjectReplicationType, ObjectOptions{}))
dsc = &resyncdsc dsc = &resyncdsc
return c.resync(oi, dsc, tgtStatuses) return c.resync(oi, dsc, tgtStatuses)