Avoid idling in transaction when exporting relation using DirectTransfer
What does this MR do and why?
This MR updates BulkImports::ExportUpload
and moves storing of an upload from after_save
to after_commit
. The reason being after_save
still has database transaction opened and if the file we upload is too big then we hit a db transaction timeout error, resulting in the upload record to not be saved.
Similar update has been done in the past to the ImportExportUpload
model here !63350 (merged)
Mentions https://gitlab.com/gitlab-org/gitlab/-/issues/383767
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.