diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-05-25 09:59:50 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-05-25 10:07:21 +0300 |
commit | a6dc615acd8170e703fd0df46a311b5d538f15fc (patch) | |
tree | ef5898d2deaa695e521cf079f0db77abb88c00b9 /internal/praefect/router_per_repository.go | |
parent | 670f304db8f8cf829150f7fb361c25479e583de9 (diff) |
praefect: Drop feature flag that fixes routing with additional repos
When rewriting the target repository, the rewritten relative path will
be specific to the node's storage to which the rewritten request is
being routed to. Consequentially, if we're also rewriting an additional
repository, it follows that both repositories must be hosted by the same
storage, or otherwise one of both repositories wouldn't actually be
resolveable on the local storage.
This property wasn't followed when routing repository creations that
have an additional repository. This can lead to a case where we resolve
the additional repository first, but ultimately assign the newly created
repository to nodes that don't actually have the additional repository.
The result is breakage.
We have fixed this bug in 41c10e01f (praefect/router: Fix creation of
repos with additional referenced repo, 2023-05-10), where we started to
route repository creating RPCs to the same nodes as the additional
repository is assigned to. This change was rolled out more than a week
ago into production systems without any observed issues.
Remove the feature flag guarding the code so that we unconditionally
route such repository creating requests to the correct node.
Diffstat (limited to 'internal/praefect/router_per_repository.go')
-rw-r--r-- | internal/praefect/router_per_repository.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/praefect/router_per_repository.go b/internal/praefect/router_per_repository.go index 63070ecfb..56726e4e5 100644 --- a/internal/praefect/router_per_repository.go +++ b/internal/praefect/router_per_repository.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" - "gitlab.com/gitlab-org/gitaly/v16/internal/featureflag" "gitlab.com/gitlab-org/gitaly/v16/internal/git/stats" "gitlab.com/gitlab-org/gitaly/v16/internal/praefect/datastore" "gitlab.com/gitlab-org/gitaly/v16/internal/praefect/nodes" @@ -307,7 +306,7 @@ func (r *PerRepositoryRouter) assignRepositoryToNodes( replicationFactor := r.defaultReplicationFactors[virtualStorage] switch { - case featureflag.FixRoutingWithAdditionalRepository.IsEnabled(ctx) && additionalRepoMetadata != nil: + case additionalRepoMetadata != nil: // RPCs that create repositories can have an additional repository. This repository // is used as additional input and is expected to be directly accessible on the // target node, or otherwise we wouldn't have to resolve its relative path. |