Skip to content

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
@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
@cheenamalhotra cheenamalhotra merged commit d44684f into dotnet:main Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SqlDataReader returns stale data

5 participants