Commit f81cc1f1 authored by Nikola Milojevic's avatar Nikola Milojevic

Merge branch '333153-remove-ff-sidekiq_load_balancing_rotate_up_to_date_replica' into 'master'

Remove replica selection change FF for LB [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!64300
parents 0c1f66a4 cb8d9048
---
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
end
def replica_caught_up?(location)
if Feature.enabled?(:sidekiq_load_balancing_rotate_up_to_date_replica)
load_balancer.select_up_to_date_host(location)
else
load_balancer.host.caught_up?(location)
end
load_balancer.select_up_to_date_host(location)
end
end
end
......
......@@ -156,20 +156,6 @@ RSpec.describe Gitlab::Database::LoadBalancing::SidekiqServerMiddleware do
expect(job['load_balancing_strategy']).to eq('retry_primary')
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
......
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