-
Yorick Peterse authored
In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68042 we found that releasing primary connections can result in test suite errors. This can happen when tests reuse a connection also used by Puma, but release it instead of letting the Puma thread release it. Reproducing this is difficult, but it happens often enough to be a problem. Since Rails already releases model connections for us, we don't actually need to release primary connections in the first place. See the following for more information: - https://tenderlovemaking.com/2011/10/20/connection-management-in-activerecord.html - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68042#note_672850193 This commit changes the load balancer code to not release primary connections, with the exception of one case where this _is_ needed. Changelog: fixed
95d3ff34