diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-12-13 12:44:23 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-12-13 12:45:51 -0500 |
commit | ff471152b62f71accda62d9ede87e0107b8a8bcb (patch) | |
tree | dbfd6463e0b4a399ae28f0e58551e4676ac7eba0 /lib/sqlalchemy/sql/traversals.py | |
parent | 926952c4afe0b2e16c4a74f05958bded7b932760 (diff) | |
download | sqlalchemy-ff471152b62f71accda62d9ede87e0107b8a8bcb.tar.gz |
Close connection if begin fails
Fixed issue where by if the "begin" of a transaction failed at the Core
engine/connection level, such as due to network error or database is locked
for some transactional recipes, within the context of the :class:`.Session`
procuring that connection from the connection pool and then immediately
returning it, the ORM :class:`.Session` would not close the connection
despite this connection not being stored within the state of that
:class:`.Session`. This would lead to the connection being cleaned out by
the connection pool weakref handler within garbage collection which is an
unpreferred codepath that in some special configurations can emit errors in
standard error.
Fixes: #5034
Change-Id: I6502a55791d86845f34bc10889c218f00765dfdc
Diffstat (limited to 'lib/sqlalchemy/sql/traversals.py')
0 files changed, 0 insertions, 0 deletions