[Zope] More on understanding conflicts

Chris Withers chris at simplistix.co.uk
Wed Dec 21 10:46:02 EST 2005


Dennis Allison wrote:
> Ah so desu.  That's the conceptual hook I was missing.  Only one
> transaction per request and no subtransactions!  

ZODB substransactions won't help you here in the slightest...

> A transaction is
> processing initiated by a client request or a redirect. (Anything else?)  
> A transaction has its own REQUEST and RESPONSE objects.

Wrong way round. Each REQUEST has one RESPONSE associated with it, and 
the publisher does either a transaction commit, if no errors occur, or a 
transaction abort, if errors occur, once it has processed a REQUEST. 
Read conflict errors can be raised at any time, but shouldn't really 
occur once you have MVCC working. Write conflict errors only happen 
during transaction commit. The publisher retries the whole request if a 
conflict errors of either sort occurs. If the retry fails 3 times, it 
gives up, aborts the transaction and reports the conflict error to the 
end user by way of writing to the response object.

hth,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list