-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Diagnostics: DataReaderDisposingEventData.ReadCount accumulates the value from different readers #27652
Comments
I see it was tagged by |
@arekpalinski thanks, I've verified and fixed this - as part of the EF Core 6.0 query perf optimization cycle, RelationalDataReader started to get recycled across executions, but the read count value wasn't properly reset. This seems like a good candidate for servicing for 6.0 (safe one-line change), we'll discuss it. |
Thank you. Yeah, I would be really great for us to have it in 6.0 since it affects our customers. |
Fixes dotnet#27652 (cherry picked from commit 1b9becc)
Fixes dotnet#27652 (cherry picked from commit 1b9becc)
It looks that in the
DataReaderDisposingEventData.ReadCount
accumulates the values from different readers.Include your code
I have the following diagnostics observer:
Diagnostics initialization:
Sample code using EF (select n+1 problem):
The above code writes the following (expected) output to the console when using EF Core version: 5.0.15:
while the same code using EF Core 6.0.3 outputs the following:
The text was updated successfully, but these errors were encountered: