Skip to content

Enable Database::MonitorLockedTablesWorker for CE and Self-Managed

What does this MR do and why?

Enables Database::MonitorLockedTablesWorker cron job for CE and Self-managed instances which monitors tables meant to be locked but aren't (locks the table if needed).

The monitor_database_locked_tables flag has already been enabled for GitLab SaaS, we're setting the default to true to turn on the feature for self-managed instances.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to set up and validate locally

Validate that the Job is enabled for CE:

  1. Run export FOSS_ONLY=1 on the terminal and remove EE license to disable EE-only features.
  2. Restart the GDK (gdk restart)
  3. In the rails console run the following (access the console via rails c):
job = Sidekiq::Cron::Job.find('database_monitor_locked_tables_cron_worker')
# Should find an instance of the Job

job.status 
# Should return "enabled"

Related to #480689 (closed)

Edited by Shane Maglangit

Merge request reports

Loading