You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not clear to me if we have to call connection.release() on a pooled connection upon rolling back during a transaction. ie...
connection.rollback(function(){// pooled connection// do we release connection??? Or should it be done before calling rollback?});
This comment seems to elude that the connection pool would do this, however I didn't see anything in the code that backs this up. #586 (comment)
I am NOT doing this today, but I noticed that doing an operation that was a few levels deep in the transaction and rolling back, that subsequent queries were getting the ENQUEUE error and I was wondering if this was caused by not releasing the connection back to the pool on a rollback.
The text was updated successfully, but these errors were encountered:
Yes, you must always call connection.release() on a connection; I mean, you can always just start another transaction on the same connection after calling connection.rollback(), so it doesn't make sense for that to release the connection.
The only case where you don't call connection.release() is when pool.getConnection() did not give you a connection in the first place. I hope that clears it up for you.
It is not clear to me if we have to call
connection.release()
on a pooled connection upon rolling back during a transaction. ie...This comment seems to elude that the connection pool would do this, however I didn't see anything in the code that backs this up.
#586 (comment)
I am NOT doing this today, but I noticed that doing an operation that was a few levels deep in the transaction and rolling back, that subsequent queries were getting the ENQUEUE error and I was wondering if this was caused by not releasing the connection back to the pool on a rollback.
The text was updated successfully, but these errors were encountered: