Use after_commit in Vulnerabilities::Feedback
after_save/after_destroy perform their work in the same transaction as the change to the model, resulting in a cross-database transaction. By using after_commit we can prevent this from happening as it uses a separate transaction. This fixes https://gitlab.com/gitlab-org/gitlab/-/issues/345667. Changelog: changed
Showing
Please register or sign in to comment