Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0.2] Add the ability to break self-ref cycles between added and removed entities #26963

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #26750

Description

Due to a bug fix we now sort Deletes before Inserts for the same table to avoid deadlocks. However in some cases this ordering can create a dependency cycle in the operations.

This fix is the same as in #26959, but applied to a different method.

Customer impact

An exception is thrown when adding and removing related self-referencing entities in the same transaction. A workaround would be to remove the entities first then add them in a separate transaction.

How found

Customer report on 6.0.0.

Regression

Yes, from 5.0. Regressed by #25952

Testing

This PR adds coverage for this scenario.

Risk

Low; the fix only affects update command ordering. Quirk mode added.

@AndriySvyryd AndriySvyryd added this to the 6.0.x milestone Dec 10, 2021
@AndriySvyryd AndriySvyryd requested a review from a team December 10, 2021 20:18
@leecow leecow modified the milestones: 6.0.x, 6.0.2 Dec 14, 2021
@ajcvickers ajcvickers merged commit 5d7d7c1 into release/6.0 Dec 15, 2021
@ajcvickers ajcvickers deleted the Issue26750 branch December 15, 2021 09:25
@ajcvickers ajcvickers removed this from the 6.0.2 milestone Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants