Skip to content

Distribute RepositoryUpdateMirror jobs with exclusive lease

Paco Guzman requested to merge 665-avoid-locking-when-updating-mirrors into master

Fixes #665 (closed)

  • Only one UpdateAllMirrorWorker can be executed at the same time. I added an ExclusiveLease
  • Only one RepositoryUpdateMirrorWorker per project make sense at the same time maybe between execution of UpdateAllMirrorWorker we didn't process the first job for some reason and both can be executed at the same time. Later another UpdateAllMirrorWorker will execute the update. I added an ExclusiveLease

Besides we distributed over time the jobs that UpdateAllMirrorWorker enqueue into Sidekiq

/cc @stanhu @jacobvosmaer-gitlab @yorickpeterse

Merge request reports