Skip to content

Deduplicate the Namespaces::RootStatisticsWorker jobs

What does this MR do?

This is an idempotent job that we can easily recover from when deduplication fails, because we keep track of the work to be done in the database: the Namespaces::AggregationSchedule model is created when there is work to be done, and destroyed when the work is finished.

Furthermore, we already have the the the Namespaces::PruneAggregationSchedulesWorker which goes through all of the aggregation schedules and schedules work if it existed. So if we're deduplicating to eagerly, the work will be repeated the next time the cron-worker does it's thing.

Required for gitlab-com/gl-infra/scalability#218 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Bob Van Landuyt

Merge request reports