Am Donnerstag 18 September 2008 07:08:56 schrieb Dieter Maurer: > Brian Sutherland wrote at 2008-9-17 12:33 +0200: > >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. > > > >I just checked in a fix, please feel free to comment on/revert it if > >it's not up to standard:) > > It looks not yet right to clear the state in "tpc_vote" when > a two phase commit is used (which is now supported by "SQLAlchemy"). > > In addition, there may be a problem in case "session.close()" raises > an exception. Then, "_finish" would not be called.
This may not be connected, but I just wanted to point out a problem with configurations with "autoflush=False". If I change some database object attributes in the session but do not call session.flush(), the data is not stored into the database, as no commit() is called, which would then flush out/commit the data. So perhaps this is something to think about, or, at least something to be denoted in the documentation. I circumvented the problem by setting autoflush=True and modifying my code so that it works (although it's quite complicated). Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 _______________________________________________ Zope-Dev maillist - Zope-Dev@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 )