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

[release/9.0-staging] Make SnapshotModelProcessor idempotent. #35543

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Jan 28, 2025

Fixes #35146
Port of #35432

Description

Each EF migration contains a snapshot of the model at the time the migration was created. The snapshots might have been created by an older version of EF, so we need to run them through SnapshotModelProcessor to make them conform to the current version of EF.

Customer impact

In EF9 we changed the way model snapshots are handled to avoid initializing them again. However, when several certain migrations management operations are called in succession this could lead to the snapshots to be processed several times, which will result in an exception most of the times. The workaround is to avoid calling the operations in the same process, but this is not always possible.

How found

Multiple customer reports on 9.0.0

Regression

Yes, from 8.0.

Testing

Test added.

Risk

Low, this only affects design-time code.

@AndriySvyryd AndriySvyryd merged commit 4623a39 into release/9.0-staging Jan 29, 2025
7 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue35146 branch January 29, 2025 18:42
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.

2 participants