[Twisted-Python] cx_Oracle, Twisted - rollback failed

Steve Lewis spiritualmechanic at yahoo.com
Wed Apr 29 13:39:30 EDT 2009


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:
            self._connection.rollback()
            return

        try:
            self._connection.rollback()
            curs = self._connection.cursor()
            curs.execute(self._pool.good_sql)
            curs.close()
            self._connection.commit()
            return
        except:
            log.err(None, "Rollback failed")

        self._pool.disconnect(self._connection)

        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?

Thanks in advance,
Steve



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090429/b64ad944/attachment.htm 


More information about the Twisted-Python mailing list