[ZODB-Dev] Invalidations

Jim Fulton jim at zope.com
Thu May 5 20:26:46 EDT 2005


Tim Peters wrote:
> [Jim Fulton]
> [...]
> 
>>ISynchronizer should grow a new method:
>>
>>     def newTransaction(transaction):
>>         """Hook that is called at the start of a transaction."""
>>
>>The TM calls this method with the new transaction.
> 
> 
> I like this, although I don't know what "start of a transaction" means.

It means that the application has called "begin" on the transaction manager.
It has signalled that any work it does after the begin call should be in
this new transaction.  The application has set a transaction boundary.

...

> A fourth possible meaning is that newTransaction should be invoked after a
> commit() or abort() too, since in some sense we (at least conceptually) "are
> in a new transaction" the instant after the current transaction ends.

Yes, this is an implicit new transaction, however, I don't think a call
is necessary. Synchronizers should know that a completion is equivalent
to an implicit begin.

> What's your true intent here?

See my definition above.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list