<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/pool.py, branch ticket_3230</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>cleanup exception handling - use new exception hierarchy (since python 2.5)</title>
<updated>2014-10-02T20:00:31+00:00</updated>
<author>
<name>ndparker</name>
<email>ndparker@users.noreply.github.com</email>
</author>
<published>2014-10-02T20:00:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=690532131d8ce8250c62f1d3e27405902df03e70'/>
<id>690532131d8ce8250c62f1d3e27405902df03e70</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>improve exception vs. exit handling</title>
<updated>2014-09-23T21:28:11+00:00</updated>
<author>
<name>ndparker</name>
<email>ndparker@users.noreply.github.com</email>
</author>
<published>2014-09-23T21:28:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ce52dd9e3b71f2074d7821fe62803d4e0eefe512'/>
<id>ce52dd9e3b71f2074d7821fe62803d4e0eefe512</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix doc typo 'conjunection'</title>
<updated>2014-08-21T18:38:23+00:00</updated>
<author>
<name>Gunnlaugur Þór Briem</name>
<email>gunnlaugur@gmail.com</email>
</author>
<published>2014-07-31T23:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=a12fcd1487f6ae210486fa4a015d9ea71e3bb7d7'/>
<id>a12fcd1487f6ae210486fa4a015d9ea71e3bb7d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed bug in connection pool logging where the "connection checked out"</title>
<updated>2014-08-20T16:01:20+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-20T16:01:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=92b0ad0fef0b9ee3d54767cf17e2baf1fd1546da'/>
<id>92b0ad0fef0b9ee3d54767cf17e2baf1fd1546da</id>
<content type='text'>
debug logging message would not emit if the logging were set up using
``logging.setLevel()``, rather than using the ``echo_pool`` flag.
Tests to assert this logging have been added.  This is a
regression that was introduced in 0.9.0.
fixes #3168
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
debug logging message would not emit if the logging were set up using
``logging.setLevel()``, rather than using the ``echo_pool`` flag.
Tests to assert this logging have been added.  This is a
regression that was introduced in 0.9.0.
fixes #3168
</pre>
</div>
</content>
</entry>
<entry>
<title>PEP8 style fixes</title>
<updated>2014-07-14T00:10:55+00:00</updated>
<author>
<name>Brian Jarrett</name>
<email>celttechie@gmail.com</email>
</author>
<published>2014-07-10T22:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=28dd15081db4b7e978fa7a187c3aef1c0e4ad4e3'/>
<id>28dd15081db4b7e978fa7a187c3aef1c0e4ad4e3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- break up the &lt;authors&gt; copyright comment as part of a pass</title>
<updated>2014-07-09T22:26:55+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-07-09T22:26:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5407ec9d389cfa1cdd4ed4b82ba311085132d9db'/>
<id>5407ec9d389cfa1cdd4ed4b82ba311085132d9db</id>
<content type='text'>
to get all flake8 passing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to get all flake8 passing
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed some "double invalidate" situations were detected where</title>
<updated>2014-05-10T19:34:42+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-05-10T19:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=85d1899b76a37b4bf922b1cea4f608ba806b41d0'/>
<id>85d1899b76a37b4bf922b1cea4f608ba806b41d0</id>
<content type='text'>
a connection invalidation could occur within an already critical section
like a connection.close(); ultimately, these conditions are caused
by the change in :ticket:`2907`, in that the "reset on return" feature
calls out to the Connection/Transaction in order to handle it, where
"disconnect detection" might be caught.  However, it's possible that
the more recent change in :ticket:`2985` made it more likely for this
to be seen as the "connection invalidate" operation is much quicker,
as the issue is more reproducible on 0.9.4 than 0.9.3.

Checks are now added within any section that
an invalidate might occur to halt further disallowed operations
on the invalidated connection.  This includes two fixes both at the
engine level and at the pool level.   While the issue was observed
with highly concurrent gevent cases, it could in theory occur in
any kind of scenario where a disconnect occurs within the connection
close operation.
fixes #3043
ref #2985
ref #2907

- add some defensive checks during an invalidate situation:
1. _ConnectionRecord.invalidate might be called twice within finalize_fairy
if the _reset() raises an invalidate condition, invalidates, raises and then
goes to invalidate the CR.  so check for this.
2. similarly within Conneciton, anytime we do handle_dbapi_error(), we might become invalidated.
so a following finally must check self.__invalid before dealing with the connection
any futher.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a connection invalidation could occur within an already critical section
like a connection.close(); ultimately, these conditions are caused
by the change in :ticket:`2907`, in that the "reset on return" feature
calls out to the Connection/Transaction in order to handle it, where
"disconnect detection" might be caught.  However, it's possible that
the more recent change in :ticket:`2985` made it more likely for this
to be seen as the "connection invalidate" operation is much quicker,
as the issue is more reproducible on 0.9.4 than 0.9.3.

Checks are now added within any section that
an invalidate might occur to halt further disallowed operations
on the invalidated connection.  This includes two fixes both at the
engine level and at the pool level.   While the issue was observed
with highly concurrent gevent cases, it could in theory occur in
any kind of scenario where a disconnect occurs within the connection
close operation.
fixes #3043
ref #2985
ref #2907

- add some defensive checks during an invalidate situation:
1. _ConnectionRecord.invalidate might be called twice within finalize_fairy
if the _reset() raises an invalidate condition, invalidates, raises and then
goes to invalidate the CR.  so check for this.
2. similarly within Conneciton, anytime we do handle_dbapi_error(), we might become invalidated.
so a following finally must check self.__invalid before dealing with the connection
any futher.
</pre>
</div>
</content>
</entry>
<entry>
<title>- work on fixing some race-condition failures:</title>
<updated>2014-03-26T20:31:52+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-03-26T20:31:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=761c8ff15de16e572a6e1382cae76d734bd411e7'/>
<id>761c8ff15de16e572a6e1382cae76d734bd411e7</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>- A major improvement made to the mechanics by which the :class:`.Engine`</title>
<updated>2014-03-22T22:45:39+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-03-22T22:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=eed9cfc3ae027f21a1f46a6e07fcef0724741eb2'/>
<id>eed9cfc3ae027f21a1f46a6e07fcef0724741eb2</id>
<content type='text'>
recycles the connection pool when a "disconnect" condition is detected;
instead of discarding the pool and explicitly closing out connections,
the pool is retained and a "generational" timestamp is updated to
reflect the current time, thereby causing all existing connections
to be recycled when they are next checked out.   This greatly simplifies
the recycle process, removes the need for "waking up" connect attempts
waiting on the old pool and eliminates the race condition that many
immediately-discarded "pool" objects could be created during the
recycle operation. fixes #2985
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
recycles the connection pool when a "disconnect" condition is detected;
instead of discarding the pool and explicitly closing out connections,
the pool is retained and a "generational" timestamp is updated to
reflect the current time, thereby causing all existing connections
to be recycled when they are next checked out.   This greatly simplifies
the recycle process, removes the need for "waking up" connect attempts
waiting on the old pool and eliminates the race condition that many
immediately-discarded "pool" objects could be created during the
recycle operation. fixes #2985
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed small issue in :class:`.SingletonThreadPool` where the current</title>
<updated>2014-03-05T23:14:09+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-03-05T23:14:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=48b82aebc3cda2ae9638f0922eea646288b45c72'/>
<id>48b82aebc3cda2ae9638f0922eea646288b45c72</id>
<content type='text'>
connection to be returned might get inadvertently cleaned out during
the "cleanup" process.  Patch courtesy jd23.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
connection to be returned might get inadvertently cleaned out during
the "cleanup" process.  Patch courtesy jd23.
</pre>
</div>
</content>
</entry>
</feed>
