[Zope] More on understanding conflicts

Chris Withers chris at simplistix.co.uk
Fri Dec 23 14:20:46 EST 2005


Dennis Allison wrote:
> The issue here has had to do with session variables and their iteraction
> with the persistence mechanism and conflicts and multiple threads for the
> same session.  Chris McDonough has pointed out that session variables can
> cause writes and write conflicts even if the only Zope level access is a
> read. 

Indeed, they have to track expirey and the like. This is why "sessions 
are evil" (tm)

> I thought MVCC works out of the box for Zope 2.8.4 which uses ZODB
> 2.3.4. Am I wrong?

Nope, it works fine, we've seen all our read conflicts go away :-)

> Sorry, I wasn't all that clear when I had my epiphany about REQUEST and
> transactions.  You said it much more clearly and precisely.  Since
> conflict errors are discovered and managed when the publisher commits,
> there is not a whole lot one can do, in terms of code organization, to
> minimize the potential for conflicts.

Oh, there's plenty, I can assure you ;-)

Ditching your frames is the 1st place I'd start... any scenario where 
several frames/iframes/whatever try to manipulate the same session 
variable (ie: per user) is doomed to failure ;-)

cheers,

Chris

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



More information about the Zope mailing list