Skip to content

Clickhouse - use exclusive lease for migrations

What does this MR do and why?

This MR adds a Redis-based exclusive lease around ClickHouse migrations. It doesn't yet take care of pausing CH workers while migrations execute, since that would require a sort of RW lock. Something like https://docs.gitlab.com/ee/development/sidekiq/worker_attributes.html#job-pause-control could be used to ensure that new jobs are not executed while the lock is active, but it wouldn't ensure that currently executing workers are finished.

Part of #428274 (closed)

Screenshots or screen recordings

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

n/a

How to set up and validate locally

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

n/a

MR acceptance checklist

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

Edited by Pedro Pombeiro

Merge request reports