Skip to content

Nullify and delete some user associations in batches

Stan Hu requested to merge sh-nullify-user-associations into master

What does this MR do and why?

When a user has a lot of associated events, Todos, or other items, deletion of the user can timeout due to the foreign key cleanup taking longer than the allowed 15 seconds.

To avoid this, we do what we did in !100962 (merged) and !101016 (merged) and mark these associations as dependent: :nullify or dependent: destroy in order to ensure Users::DestroyService cleans them up in batches.

Relates to #358760 (closed)

Closes #377986 (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

Loading