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

Fix wrong data blended with transactions in .NET core #1023

Merged
merged 7 commits into from
Apr 15, 2021

Conversation

DavoudEshtehari
Copy link
Contributor

root cause: The wrong data occurs when a delegated transaction completes (rollback or commit) with open result sets. In this situation, we need a new physical state object to avoid the wrong data issue.

  • The other changes came from a comparison with .NET Framework.

Davoud Eshtehari added 2 commits April 6, 2021 14:09
@DavoudEshtehari DavoudEshtehari linked an issue Apr 6, 2021 that may be closed by this pull request
@DavoudEshtehari DavoudEshtehari added the 🐛 Bug! Issues that are bugs in the drivers we maintain. label Apr 6, 2021
@cheenamalhotra
Copy link
Member

Is it possible to write a test case for this scenario if we can force reproduce it?

@Wraith2
Copy link
Contributor

Wraith2 commented Apr 7, 2021

Which part actually makes the difference? It looks like this re-enabled a commented out exception and adds an optional parameter to a function call. How does that resolve the issue, where do those changes track to and what to they cause to happen differently?

@cheenamalhotra cheenamalhotra added this to the 3.0.0-preview2 milestone Apr 7, 2021
@DavoudEshtehari
Copy link
Contributor Author

Which part actually makes the difference? It looks like this re-enabled a commented out exception and adds an optional parameter to a function call. How does that resolve the issue, where do those changes track to and what to they cause to happen differently?

Yes, that's the change that caused the fix. Raising that exception dooms the using connection while a transaction is aborted.

@Wraith2
Copy link
Contributor

Wraith2 commented Apr 7, 2021

Ok. At least I'm not missing something then. Is there any clue why that line was commented out? It's a quite important line to accidentally remove.

@DavoudEshtehari
Copy link
Contributor Author

DavoudEshtehari commented Apr 7, 2021

I couldn't find anything; it was commented out since the very beginning (August 2018 as I found) before publishing on GitHub. 😕

cc @saurabh500

+ address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug! Issues that are bugs in the drivers we maintain.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SqlDataReader returns stale data
5 participants