Skip to content
  • James Liu's avatar
    praefect: Pass through partitioning hints · ce0e2eb3
    James Liu authored
    With https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150420,
    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.
    ce0e2eb3