diff options
Diffstat (limited to 'lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb')
-rw-r--r-- | lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb b/lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb index 5d91292b8de..3180289ec69 100644 --- a/lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb +++ b/lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb @@ -97,8 +97,14 @@ module Gitlab end def databases_in_sync?(wal_locations) + locations = if Feature.enabled?(:indifferent_wal_location_keys) + wal_locations.with_indifferent_access + else + wal_locations + end + ::Gitlab::Database::LoadBalancing.each_load_balancer.all? do |lb| - if (location = wal_locations[lb.name]) + if (location = locations[lb.name]) lb.select_up_to_date_host(location) else # If there's no entry for a load balancer it means the Sidekiq |