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

Projects
None yet
2 participants
@kibertoad
Copy link
Collaborator

commented May 30, 2019

fixes #3246

@kibertoad kibertoad requested a review from elhigu May 30, 2019

kibertoad added some commits Jun 19, 2019

@kibertoad

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 19, 2019

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

kibertoad added some commits Jun 19, 2019

Merge branches 'fix/do-not-reject-on-rollback' and 'master' of https:…
…//github.com/tgriesser/knex into fix/do-not-reject-on-rollback

# Conflicts:
#	src/transaction.js
#	test/unit/knex.js
@elhigu

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 20, 2019

Does that need to happen in this pr?

@elhigu

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 21, 2019

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

@elhigu

elhigu approved these changes Jun 21, 2019

Copy link
Collaborator

left a comment

I didnt find this approval form from phone yesterday 😅

@kibertoad

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 21, 2019

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

@kibertoad kibertoad merged commit 4a631a3 into master Jun 21, 2019

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 88.074%
Details

@kibertoad kibertoad deleted the fix/do-not-reject-on-rollback branch Jun 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.