Skip to content

Rewrite additional repository relative path

Sami Hiltunen requested to merge smh-additional-repository-replica-path into master

Praefect's coordinator is currently rewriting the relative path to the replica path for the target repository when proxying RPC calls. The ObjectPool service's RPCs function slightly different from the other RPCs. In addition to the target repository, they carry an additional repository. Depending on the context, this either refers to the pool repository or the repository linked to the pool. The assumption is that the pool repository is always present on the same storage as the target repository so Praefect is rewriting the storage to match. With praefect generated relative paths, the pool repository's disk path is not the same as what the client creates the repository with but will be a Praefect generated one. To have the pool operations work with Praefect generated replica paths, this MR extends the router and the coordinator to also rewrite the relative paths of the additional repositories to the replica paths stored in the database. This ensures backwards compatibility when Praefect begins generating unique relative paths in 14.6.

CreateRepository is also updated in this MR to pass through to accept the replica path as a parameter instead of assuming the replica path is always the same as the relative path. This aids in testing these changes and will be used in 14.6 to store the generated path to the database.

Related to: #3485 (closed)

Edited by Sami Hiltunen

Merge request reports