diff --git a/lib/gitlab/database/load_balancing/host.rb b/lib/gitlab/database/load_balancing/host.rb index 22cdbd4c93284a872a616db1bb369e9d380dcdd9..0b6f0f16cdbdeee412c6a26ceb74051800efff9d 100644 --- a/lib/gitlab/database/load_balancing/host.rb +++ b/lib/gitlab/database/load_balancing/host.rb @@ -328,7 +328,7 @@ def double_replication_lag_time? end def low_timeout_for_host_queries? - Feature.enabled?(:load_balancer_low_statement_timeout) + Feature.enabled?(:load_balancer_low_statement_timeout, Feature.current_pod) end end end diff --git a/spec/lib/gitlab/database/load_balancing/host_spec.rb b/spec/lib/gitlab/database/load_balancing/host_spec.rb index 69734549d9e8707566838464296eb4e959fe916e..aec7769e40e63ffb30e6a4e1fba187cfc68fdd40 100644 --- a/spec/lib/gitlab/database/load_balancing/host_spec.rb +++ b/spec/lib/gitlab/database/load_balancing/host_spec.rb @@ -448,7 +448,7 @@ def expect_next_replica_connection context 'with the flag set' do before do - stub_feature_flags(load_balancer_low_statement_timeout: true) + stub_feature_flags(load_balancer_low_statement_timeout: Feature.current_pod) end it 'returns quickly if the underlying query takes a long time' do