-
Notifications
You must be signed in to change notification settings - Fork 286
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
abort connection at sqltransaction #299
Conversation
You could use a catch when clause, Test(s)? The removal of the DoomConnectionNoReuse calls will now allow the transaction to be repooled, is that intented? If so there seem to be no callers to the method anymore so it can be removed. If aborting the connection causes it not to be re-pooled (which seem to be the suggestion from the new comment) why was this function needed originally? |
It looks like dooming the connection also causes it to not be returned to the pool. CanBePooled references:
Agreed. That was added as part of the first attempted fix for 130 and should be removed here.
Overly cautious trying to fix the issue originally since we could not repro it. |
I couldn't write a test for it since it's difficult to reproduce a commit timeout consistently.. The only way I could reproduce the timeout for consistently is by changing the connection timeout to 1ms in the driver. This can not be done in a client application or test because minimum timeout that can be set in the connection string is 1 second.
I removed this part because by the time
Yes that's right. I will remove the function in the next change. |
There are a number of places in the tests that use private reflection to alter internal data to help cause specific scenarios. If the test would be repeatable with only the capacity to alter that timeout it might be worth doing the same here. |
Fixes #291