Skip to content
  • Sami Hiltunen's avatar
    Consider partitioning hints when assigning repositories to partitions · 52ea8425
    Sami Hiltunen authored
    Gitaly needs to partition pools, source repositories and forks in the
    same partition. Generally the RPCs creating the repositories or the
    relationships carry an additional repository that is depending on the
    RPC either the pool, fork, or the source repository. This enables
    Gitaly to figure out which partition the target repository should be
    placed. In some cases though, the RPC doesn't contain this context.
    For example, ReplicateRepository first replicates the object pool and
    then the linked repository. The ReplicateRepository request itself
    doesn't carry enough information to determine which partition a given
    repository should go into but the caller knows whether the repository
    being replicated will be subsequently linked to a pool. To account
    for such scenarios, this commit starts considering partitioning hints
    sent by the client when creating partitiong assignments. The client
    sends a relative path that the target repository should be placed in
    the same partition with. Sending such a hint will then lead to both
    repositories being in the same partition and enable linking them
    together later.
    52ea8425