Skip to content

Remove ImportStateNotFound from ProjectImportScheduleWorker

Bob Van Landuyt requested to merge bvl-delayed-import-schedule-worker into master

This makes sure that the ProjectImportScheduleWorker uses replicas for it's reads in the beginning of the job.

We need to allow retries for the delayed strategy, because that will raise an error if it cannot find an up-to-date replica in 0.8s the first time.

If the job can't find an up-to-date replica in the retry, it will use the primary instead.

So for that, we needed to remove the ImportStateNotFound error from the worker.

We cannot recover from this error, so we don't need to retry it.

Retries were previously disabled for this worker, counting on it to be rescheduled again. But we want to be able to retry this job so we can allow it to use replicas, and can recover from an error if a replica isn't caught up.

In practice, we never see this error: https://log.gprd.gitlab.net/goto/4b2399a0-d200-11ec-aade-19e9974a7229

For gitlab-com/gl-infra/scalability#1681 (comment 944511101)

Edited by Bob Van Landuyt

Merge request reports