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
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Bob Van Landuyt