summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-26 16:31:52 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-26 16:31:52 -0400
commit761c8ff15de16e572a6e1382cae76d734bd411e7 (patch)
tree206e5f7666adf2754bf77c5719206282441bf1a3 /lib/sqlalchemy/engine/base.py
parentdc0d581d5d10589e02d8d38698afb470559d22f2 (diff)
downloadsqlalchemy-761c8ff15de16e572a6e1382cae76d734bd411e7.tar.gz
- work on fixing some race-condition failures:
1. make sure pool._invalidate() sets the timestamp up before invalidating the target connection. we can otherwise show how the conn.invalidate() + pool._invalidate() can lead to an extra connection being made. 2. to help with that, soften up the check on connection.invalidate() when connection is already closed. a warning is fine here 3. add a mutex to test_max_overflow() when we connect, because the way we're using mock depends on an iterator, that needs to be synchronized
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r--lib/sqlalchemy/engine/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index 6e1564c34..9f656cac8 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -1115,8 +1115,8 @@ class Connection(Connectable):
if self._is_disconnect:
del self._is_disconnect
dbapi_conn_wrapper = self.connection
+ self.engine.pool._invalidate(dbapi_conn_wrapper, e)
self.invalidate(e)
- self.engine.pool._invalidate(dbapi_conn_wrapper)
if self.should_close_with_result:
self.close()