Hijack AR::Base.connection in the DB load balancer
This changes the load balancing logic so we hijack `ActiveRecord::Base.connection` instead of hijacking "connection" on a per model basis. This ensures _all_ code that might use it (including Rails internals) goes through the database load balancer. This in turn should make the application more resistant to failures on the primary. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/3191
Showing
Please register or sign in to comment