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(mssql): force transactions if attempting to insert more than 1,000 rows #15458
fix(mssql): force transactions if attempting to insert more than 1,000 rows #15458
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes but overall looks good :)
e2f4e11
to
ecd9fcc
Compare
Ah, looks like this change causes an unexpected deadlock? |
Yep, need to investigate why - it passes the integration tests locally which is a bit odd, so I'll have to check into what's going on with our GH action. |
ecd9fcc
to
259f675
Compare
Converting to draft since I can't get the test failures repro'd locally - will need to push a lot |
259f675
to
9ffe2b1
Compare
I was interested by the failing tests and it's a weird one. The inputs (associationInstances and includeOptions) are the same, but I'm using the following test to debug; In this case the UserId in Product is null instead of 1 or 2, which causes the test to fail. Weird stuff |
@WikiRik you're saying the same inputs are applied to the same input array but are yielding different results? |
411cc4c
to
629cc63
Compare
Pull Request Checklist
Description Of Change
Force a transaction to be used if we're attempting to insert more than 1,000 rows in a single
bulkInsert
. This allows us to safely rollback everything in case it fails.This fixes #15426.