On Feb 7, 2014, at 11:16 AM, Claudio Freire <klaussfre...@gmail.com> wrote:
>> and neither Session.remove nor Session.close really roll back the >> transaction > > No, but the connection pool should. (reset_on_return, which I have enabled) reset_on_return is on by default. the pool has always emitted a rollback, the reset_on_return feature was added for some folks who either wanted to do nothing for MySQL/MyISAM, or wanted it to do a commit() on SQL Server. > >> The connection pool, if in use, will then not >> actually "close" the connection if it is to remained pooled, it calls >> rollback() as part of the pool release mechanism. Recent versions of >> SQLAlchemy allow this to show up in the engine logs like any other rollback, >> so you probably wouldn't have noticed. > > And *this* is what was not happening. Somehow, transactions remained > open on the database (I checked). that kind of thing generally happens to people when they aren’t cleaning up their sessions, or are using awkward engine/connection patterns. the pool has had a lot of bugs fixed but I haven’t seen a bug where the pool isn’t emitting the rollback when the connection is marked closed.
signature.asc
Description: Message signed with OpenPGP using GPGMail