Commit 57d7e44f authored by Sean McGivern's avatar Sean McGivern

Handle `select_one` queries in database load balancing

We have `select` going to the secondary, and `select_all` optionally
going to the secondary, but `select_one` (using for methods like `any?`)
was going to a primary via `method_missing`.

Similarly, if we're handling `quote_column_name`, we should treat
`sanitize_limit` in the same way.
parent 875bbb8e
...@@ -24,7 +24,9 @@ module Gitlab ...@@ -24,7 +24,9 @@ module Gitlab
).freeze ).freeze
NON_STICKY_READS = %i( NON_STICKY_READS = %i(
sanitize_limit
select select
select_one
quote_column_name quote_column_name
).freeze ).freeze
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment