Move FinishBatchedRelationExportWorker out of ensure block
What does this MR do and why?
This MR updates BulkImports::BatchedRelationExportService#execute
and moves FinishBatchedRelationExportWorker
outside of ensure block in order to avoid the following problematic scenario:
- Start new relation export (in batches) using
BulkImports::BatchedRelationExportService
- A statement timeout error occurs during
BulkImports::BatchedRelationExportService#enqueue_batch_exports
which raises - The ensure block of
BulkImports::BatchedRelationExportService#execute
still enqueuesBulkImports::BatchedRelationExportService::FinishBatchedRelationExportWorker
causing the export to be marked as finished with no batches exported - As a result, the migration of said relation fails to complete
Mentions #431781 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
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.