Specify tags in options while selecting replication targets (#14126)

When the replication rule is based on tag matches, the replication process
should pick up targets matching the tags specified in the replication
rule.

Fixing regression due to #12880
This commit is contained in:
Poorna 2022-01-19 10:45:42 -08:00 committed by GitHub
parent f22e745514
commit 288e276abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -861,8 +861,9 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje
return
}
tgtArns := cfg.FilterTargetArns(replication.ObjectOpts{
Name: object,
SSEC: crypto.SSEC.IsEncrypted(objInfo.UserDefined),
Name: object,
SSEC: crypto.SSEC.IsEncrypted(objInfo.UserDefined),
UserTags: objInfo.UserTags,
})
// Lock the object name before starting replication.
// Use separate lock that doesn't collide with regular objects.