Skip to content

praefect: Pass through partitioning hints

James Liu requested to merge jliu-project-moves-partition-hinting into master

#5764 (closed)

With gitlab!150420 (merged), partitioning hints will be provided by Rails via the gRPC request metadata when invoking the ReplicateRepository RPC. This is done during project moves to ensure Gitaly partitions the repository and its object pools in the same partition.

Modify the stream director so it attempts to extract the partitioning hint from the incoming context. This is treated the same way as an additional repository, so it gets rewritten to the @cluster/... style path that Gitaly cluster expects. Finally, ensure the rewritten path is set back into the request context which is later used by the partition manager.

Modify the coordinator's ReplicateRepository tests to exercise the partitioning hint branch too.

Edited by James Liu

Merge request reports