[Zope-dev] zope.sqlalchemy locks up transaction

Brian Sutherland brian at vanguardistas.net
Tue Sep 16 09:47:30 EDT 2008


On Tue, Sep 16, 2008 at 02:01:07PM +0100, Laurence Rowe wrote:
> Brian Sutherland wrote:
> > Hi,
> > 
> > I've recently seen a situation where zope.sqlalchemy locked up the
> > transaction machinery. I'm not sure exactly what happened, but have
> > attached a failing test for at least one bug which may have caused it.
> > Hopefully it's self explanatory;)
> > 
> > If someone could help me solve this, that would be great!
> 
> Could you try this with latest trunk. I checked in a fix the other day 
> that may help.

The specific error I get is this. Basically, it looks like the session
state is deleted but the actual commit fails.

As the session state is deleted, the abort() always fails, preventing
you from either committing or aborting the transaction.

Error in test testAbortAfterCommit (zope.sqlalchemy.tests.ZopeSQLAlchemyTests)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py", line 260, in run
    testMethod()
  File "/Users/jinty/src/zope.sqlalchemy/src/zope/sqlalchemy/tests.py", line 189, in testAbortAfterCommit
    transaction.abort()
  File "/Users/jinty/.buildout/eggs/transaction-1.0a1-py2.5.egg/transaction/_manager.py", line 96, in abort
    return self.get().abort()
  File "/Users/jinty/.buildout/eggs/transaction-1.0a1-py2.5.egg/transaction/_transaction.py", line 468, in abort
    rm.abort(self)
  File "/Users/jinty/src/zope.sqlalchemy/src/zope/sqlalchemy/datamanager.py", line 54, in abort
    del _SESSION_STATE[id(self.session)]
KeyError: 18171152



> 
> Laurence
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )

-- 
Brian Sutherland


More information about the Zope-Dev mailing list