Skip to content

Deduplicate Geo cronjobs

Michael Kozono requested to merge mk/geo-deduplicate-until-executed into master

What does this MR do?

Deduplicates Geo cronjobs.

The default deduplication setting is :until_executing. For cronjobs which are enqueued every minute, we can confidently take it a bit further and use :until_executed.

This should be slightly more efficient, and it should help some edge cases like #328057 (closed).

The modified classes are inherited in the following class files, as shown in grep output:

./ee/app/workers/geo/scheduler/primary/scheduler_worker.rb:      class SchedulerWorker < Geo::Scheduler::SchedulerWorker
./ee/app/workers/geo/scheduler/primary/per_shard_scheduler_worker.rb:      class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker
./ee/app/workers/geo/scheduler/secondary/scheduler_worker.rb:      class SchedulerWorker < Geo::Scheduler::SchedulerWorker
./ee/app/workers/geo/scheduler/secondary/per_shard_scheduler_worker.rb:      class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker
./ee/app/workers/geo/repository_sync_worker.rb:  class RepositorySyncWorker < Geo::Scheduler::Secondary::PerShardSchedulerWorker
./ee/app/workers/geo/registry_sync_worker.rb:  class RegistrySyncWorker < Geo::Scheduler::Secondary::SchedulerWorker
./ee/app/workers/geo/repository_verification/primary/shard_worker.rb:      class ShardWorker < Geo::Scheduler::Primary::SchedulerWorker
./ee/app/workers/geo/repository_verification/primary/batch_worker.rb:      class BatchWorker < Geo::Scheduler::Primary::PerShardSchedulerWorker
./ee/app/workers/geo/repository_verification/secondary/shard_worker.rb:      class ShardWorker < Geo::Scheduler::Secondary::SchedulerWorker
./ee/app/workers/geo/repository_verification/secondary/scheduler_worker.rb:      class SchedulerWorker < Geo::Scheduler::Secondary::PerShardSchedulerWorker
./ee/app/workers/geo/container_repository_sync_dispatch_worker.rb:  class ContainerRepositorySyncDispatchWorker < Geo::Scheduler::Secondary::SchedulerWorker
./ee/app/workers/geo/repository_shard_sync_worker.rb:  class RepositoryShardSyncWorker < Geo::Scheduler::Secondary::SchedulerWorker
./ee/app/workers/geo/file_download_dispatch_worker.rb:  class FileDownloadDispatchWorker < Geo::Scheduler::Secondary::SchedulerWorker

Resolves #328364 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Michael Kozono

Merge request reports