Skip to content

Draft: Refactor SidekiqClientMiddleware

Nikola Milojevic requested to merge fix_sidekiq_load_balancing into master

What does this MR do and why?

In !106184 (merged) we fixed the problem when all replica hosts were offline, but the fix was more of a band-aid.

This MR implements the proper fix that was discussed here.

This MR:

  • Removes database_replica_location and always ask the LB read_connection_write_location
  • Make LB#primary_wal_location also to use read_connection_write_location by just forcing read_write path
  • Remove ENV flip and always use new wal query.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to: #385255 (comment 1203960895)

Edited by Nikola Milojevic

Merge request reports