Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[Release/3.1] Fix wrong data blended with transactions in .NET Core#43069

Merged
danmoseley merged 2 commits intodotnet:release/3.1from
cheenamalhotra:release/3.1-transactionFix1
May 6, 2021
Merged

[Release/3.1] Fix wrong data blended with transactions in .NET Core#43069
danmoseley merged 2 commits intodotnet:release/3.1from
cheenamalhotra:release/3.1-transactionFix1

Conversation

@cheenamalhotra
Copy link
Member

Ports dotnet/SqlClient#1023 to fix a critical issue that also exists in System.Data.SqlClient:

  • Fixes #980 SqlDataReader returns stale data

Summary

When working with delegated transactions, completing a transaction with open resultset leads to data corruption in the connection instance that's sent back to connection pool. Because connection pooling is enabled by default, it results in the pooled connection to contain stale data from old transaction.

This issue was identified in Microsoft.Data.SqlClient but was also traced back to System.Data.SqlClient oldest version in .NET Core.

Customer Impact

Critical: This issue causes data corruption and leads to customers reading data from old query.

Regression?

No: The issue exists since System.Data.SqlClient v4.5.0-preview1.
It was an error that occurred during port activity of System.Data.SqlClient Transaction support from .NET Framework.

Testing

Test has been added to cover the wrong data flow.

Risk

Low: Fix matches the implementation with System.Data.SqlClient (in .NET Framework) and has been verified by various members of the community. It has also been released in Microsoft.Data.SqlClient v3.0.0-preview2.

cc: @danmoseley @saurabh500 @David-Engel

@cheenamalhotra cheenamalhotra force-pushed the release/3.1-transactionFix1 branch from cbb83c3 to f4f7c62 Compare April 26, 2021 22:30
…der.cs

Co-authored-by: DavoudEshtehari <61173489+DavoudEshtehari@users.noreply.github.com>
@cheenamalhotra cheenamalhotra added the Servicing-consider Issue for next servicing release review label Apr 28, 2021
@aik-jahoda
Copy link

We have open branch, please mark the PR with Servicing-approved tag once approved.

@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 6, 2021
@leecow leecow added this to the 3.1.17 milestone May 6, 2021
@danmoseley danmoseley merged commit fabb36a into dotnet:release/3.1 May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants