Skip to content

Nullify merge request and user associations in batches on user deletion

Stan Hu requested to merge sh-batch-nullify-merge-request-user into master

What does this MR do and why?

We have been seeing failures to delete a user because the foreign key relation with users.id and merge_requests.updated_by_id is failing to nullify within the 15-second statement timeout. Just as we did with nullifying IDs in batches with the issues table in !84709 (merged), we need do the same with merge_requests.updated_by_id and merge_requests.assignee_id. Note that author_id and merge_user_id are assigned to the ghost user.

Relates to #358760 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports