Commit cb8d9048 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Remove replica selection change FF for LB

Removes the feature flag. As the result,
there would be a lower chance the retry would
be required.

Changelog: performance
parent c9cbc2a1
---
name: sidekiq_load_balancing_rotate_up_to_date_replica
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63413/
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/333153
milestone: '14.0'
type: development
group: group::memory
default_enabled: false
...@@ -68,11 +68,7 @@ module Gitlab ...@@ -68,11 +68,7 @@ module Gitlab
end end
def replica_caught_up?(location) def replica_caught_up?(location)
if Feature.enabled?(:sidekiq_load_balancing_rotate_up_to_date_replica)
load_balancer.select_up_to_date_host(location) load_balancer.select_up_to_date_host(location)
else
load_balancer.host.caught_up?(location)
end
end end
end end
end end
......
...@@ -156,20 +156,6 @@ RSpec.describe Gitlab::Database::LoadBalancing::SidekiqServerMiddleware do ...@@ -156,20 +156,6 @@ RSpec.describe Gitlab::Database::LoadBalancing::SidekiqServerMiddleware do
expect(job['load_balancing_strategy']).to eq('retry_primary') expect(job['load_balancing_strategy']).to eq('retry_primary')
end end
end end
context 'replica selection mechanism feature flag rollout' do
before do
stub_feature_flags(sidekiq_load_balancing_rotate_up_to_date_replica: false)
end
it 'uses different implementation' do
expect(::Gitlab::Database::LoadBalancing).to receive_message_chain(:proxy, :load_balancer, :host, :caught_up?).and_return(false)
expect do
process_job(job)
end.to raise_error(Sidekiq::JobRetry::Skip)
end
end
end end
end end
......
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