Update BulkImports::EntityWorker deduplication strategy
What does this MR do and why?
Mentions #352984 (closed)
This MR updates BulkImports::EntityWorker
's deduplication strategy from until_executed
to until_executing
. The main reason is sometimes the migration can get stalled in started
state, without progressing further. EntityWorker
enqueues many PipelineWorker
s, which when finished, enqueues EntityWorker
again, so that a new batch of pipeline workers can be process, from the next stage.
Migration stall can happen intermittently, not always, due to timings, in the following scneario:
- Entity worker schedules 3 pipeline workers
- First pipeline worker finishes and enqueues entity worker
- While entity worker is executing (and will exit early, since current 'stage' is running), the other 2 pipeline workers enqueue entity worker with the same arg 2 more times
- Both of the enqueued Entity worker jobs will be deduplicated and entity worker will not be enqueued anymore
- As a result, migration is stalled in started state
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.