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/7.0] Reset query tracking behavior correctly if set on DbContextOptions #29797

Merged
merged 2 commits into from
Jan 4, 2023

Conversation

ajcvickers
Copy link
Contributor

@ajcvickers ajcvickers commented Dec 8, 2022

Port of #29766
Fixes #29733

Description

When using DbContext pooling, a query tracking behavior of NoTracking could be changed to TrackAll after the context has been returned to the pool and retrieved again.

Customer impact

Queries running with the wrong tracking behavior could result in application crashes, incorrect data, and reduced performance.

How found

Customer reported on 7.0

Regression

Yes, from 6.0.

Testing

Added a tests around this area where the tracking behavior is specified on the options builder.

Risk

Low; simple code change, and a quirk was added to revert back to older behavior.

@ajcvickers ajcvickers requested a review from a team December 8, 2022 12:03
@ajcvickers ajcvickers added this to the 7.0.x milestone Dec 8, 2022
@rbhanda rbhanda modified the milestones: 7.0.x, 7.0.3 Dec 8, 2022
@wtgodbe wtgodbe merged commit c70e72a into release/7.0 Jan 4, 2023
@wtgodbe wtgodbe deleted the ComeBackStrider1208 branch January 4, 2023 18:32
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.

4 participants