> Curious:  ZODB 3.4's and Zope 2.8's and Zope3's test suites all let this
> one slip by.  To provoke this, looks like Zope3 had to do
> transaction.begin() before it opened any connections.  Nothing wrong with
> that, it's just unusual -- at least for human-written code <wink>.

Jim, I think this may point to a deeper, older bug in
ThreadTransactionManager (TTM):  if no synchronizers have been registered
with a thread by the time TTM needs to create a Transaction object, TTM
passes None as the `synchronizers` argument to the Transaction constructor.
That Transaction object will then never learn about any synchronizers that
may register with TTM after this point.  So, e.g., in

     start with a clean slate
     cn = DB.open(whatever)

cn's afterCompletion() method won't get called.

The base transaction manager doesn't have this problem (if problem it is
...), it's specific to the thread transaction manager.

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to