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

Do not reject promise on transaction rollback #3235

Merged
merged 9 commits into from Jun 21, 2019

Conversation

kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented May 30, 2019

fixes #3246

@kibertoad kibertoad requested a review from elhigu May 30, 2019 22:46
@kibertoad
Copy link
Collaborator Author

@elhigu I've updated implementation to have explicit checks that we actually were rollbacking ourselves. What do you think?

@elhigu
Copy link
Member

elhigu commented Jun 20, 2019

Sounds like a good idea! I didn’t see any problems with code either. 👍

I should write out some tests which actually tests what happens in knex In different dialects when query throws e.g. conflict error inside transaction which is not leaked out of handler and not causing knex side rollback. Currently I know only more or less what pg dialect does in that case.

@kibertoad
Copy link
Collaborator Author

Does that need to happen in this pr?

@elhigu
Copy link
Member

elhigu commented Jun 20, 2019

Does that need to happen in this pr?

no, thats why I said I should..., I just have personal interest to know how knex really behaves in those cases with other drivers. Sorry for being vague :)

@kibertoad
Copy link
Collaborator Author

@elhigu Thought so, but clarified just in case, as you didn't approve PR either :-D

Copy link
Member

@elhigu elhigu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didnt find this approval form from phone yesterday 😅

@kibertoad
Copy link
Collaborator Author

Ahaha, yeah, mobile version is a mess. Thanks!

@kibertoad kibertoad merged commit 4a631a3 into master Jun 21, 2019
@kibertoad kibertoad deleted the fix/do-not-reject-on-rollback branch June 21, 2019 10:56
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.

Transaction rollback cause unhandled rejection
2 participants