-
Yorick Peterse authored
Previously when performing a write we would stick to the primary for the duration of a request. This could lead to unnecessary pressure on the primary database. To work around this we stop using the primary the moment all secondaries are in sync with the last write. If we are in an explicit transaction we will keep using the primary until the transaction finishes. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/6041
5943260c