Skip to content

[release/7.0] Fix SQL Server bulk insert edge case (#29669) - #29717

Merged
wtgodbe merged 1 commit into
dotnet:release/7.0from
roji:PendingCommandsEdgeCase7
Jan 4, 2023
Merged

[release/7.0] Fix SQL Server bulk insert edge case (#29669)#29717
wtgodbe merged 1 commit into
dotnet:release/7.0from
roji:PendingCommandsEdgeCase7

Conversation

@roji

@roji roji commented Nov 30, 2022

Copy link
Copy Markdown
Member

Fixes #29539, backports #29669

Description

In the SQL Server provider, when there are pending bulk inserts (into the same table) and a new command is added which causes the batch to go over the parameter limit, we incorrectly rollback the pending commands and not just the new command.

Customer impact

When inserting a large number of rows in SQL Server, SaveChanges throws if the last command causes us to go over the parameter limit.

How found

Customer reported on 7.0

Regression

Yes.

Testing

Added a test for the affected scenario.

Risk

Low; the fix is quite trivial, and a quirk was added to revert back to older behavior.

@roji
roji requested a review from a team November 30, 2022 10:51
@rbhanda rbhanda added this to the 7.0.3 milestone Dec 6, 2022
@wtgodbe
wtgodbe merged commit d0edfaa into dotnet:release/7.0 Jan 4, 2023
@roji
roji deleted the PendingCommandsEdgeCase7 branch June 13, 2025 06:34
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