[Twisted-Python] cx_Oracle, Twisted - rollback failed
exarkun at divmod.com
Wed Apr 29 13:46:46 EDT 2009
On Wed, 29 Apr 2009 10:39:30 -0700 (PDT), Steve Lewis <spiritualmechanic at yahoo.com> wrote:
>It looks like the latest version 8.2 tries to rollback without seeing if the connection is even open or not:
> def rollback(self):
> if not self._pool.reconnect:
> curs = self._connection.cursor()
> log.err(None, "Rollback failed")
> if self._pool.noisy:
> log.msg("Connection lost.")
> raise ConnectionLost()
>I'm seeing the "Rollback failed" log message and then the ConnectionLost exception being thrown. I have cp_reconnect set to True, so it's skipping down to the try/except and failing on rollback. Should the code try to rollback if the connection is lost?
Is there some way it can determine that the connection has been lost aside
from trying the rollback (and is compatible with other DB-API 2.0 modules)?
More information about the Twisted-Python