Add schedule delay for RepositoryUpdateMirrorWorker
What does this MR do and why?
- Contributes to #364799 (closed)
- Feature flag: #365948 (closed)
Problem
RepositoryUpdateMirrorWorker
with sticky data consistency cannot find
a replica in sync and falls back to primary
.
Solution
Schedule RepositoryUpdateMirrorWorker
with 1 minute delay. This delay should not be a problem because the delay between projects updates is higher and equal every 30 minutes.
Screenshots or screen recordings
How to set up and validate locally
- Enable feature flag
Feature.enable(:delay_for_repository_update_mirror)
- Create an empty project
- Go to Settings -> Repository -> Mirroring repositories
- Select Mirror direction - Pull, Git repository URL -
https://gitlab.com/sinatra/sinatra.git
(or any other public git project) and pressMirror repository
- Open Sidekiq monitoring - http://127.0.0.1:3000/admin/background_jobs (Scheduled tab)
- You should see
RepositoryUpdateMirrorWorker
job scheduled with 1 minute delay
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin