Geo: Secondary is proxying Git pulls unnecessarily
Problem
Pulls against a secondary Geo site are being proxied to the primary even when the secondary site is up-to-date.
This can be a significant problem for those who are using Geo secondaries to:
- offload heavy read activity.
- cope with low bandwidth between sites
Possible solution
Project replication is handled by ProjectRepositoryRegistry and SSF since 16.3 !125927 (merged).
But our "repository out of date?" logic checks the legacy ProjectRegistry record:
- https://gitlab.com/gitlab-org/gitlab/-/blob/b363a88fde8bf001df4da25319146d2bffdb313b/ee/lib/ee/gitlab/geo_git_access.rb#L40
- https://gitlab.com/gitlab-org/gitlab/-/blob/678e5f72ae08b1e04bba272787fd4cab253a4826/ee/app/controllers/ee/repositories/git_http_client_controller.rb#L87
- https://gitlab.com/gitlab-org/gitlab/-/blob/678e5f72ae08b1e04bba272787fd4cab253a4826/ee/app/controllers/ee/repositories/git_http_client_controller.rb#L211
Edited by Michael Kozono