ReplicateRepository called via Praefect fails when target repository exists
ReplicateRepository is treated as an RPC that creates repositories in Praefect, which means that we'll try to allocate a repository ID whenever it is called. While it can in fact create repositories in case the target repository doesn't yet exist, it is perfectly valid to also call this RPC when the target repository does already exist. Right now though we'll refuse any call to ReplicateRepository
with an AlreadyExists
error in case it's called to replicate an existing repository.
Edited by Patrick Steinhardt