Skip to content

Allow sidekiq to react to becoming a Geo primary or secondary without a restart

Nick Thomas requested to merge (removed):4048-sidekiq-cron-geo-2 into master

What does this MR do?

Sidekiq runs a set of cron jobs. This set differs according to whether the node is a Geo primary or secondary, or if Geo is disabled. Previously, the state was determined once, when sidekiq was started. Now, we add a cron job that runs the same logic each minute.

To reduce churn, the enable/disable logic now only changes jobs if they are in the wrong state.

Are there points in the code the reviewer needs to double check?

The post-deployment migration is a bit of a cheat, but we need to re-enable these jobs as a one-time operation (so they can be manually disabled later if the administrator so desires).

Why was this MR needed?

In HA scenarios, ensuring every node is restarted in a timely manner is not easy. Much better to respond to changes without a restart being required.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #4048 (closed)

Edited by Nick Thomas

Merge request reports