[Zope] Conflict Errors

Richard Jones richard@bizarsoftware.com.au
Fri, 2 Nov 2001 09:50:55 +1100


On Thursday 01 November 2001 17:00, Chris McDonough wrote:
> Yeah, well... yeah.  (Staring at shoes)... conflicts can also happen
> on.. reads.  Yes.  Read conflicts, they're called.  This happens in the
> setstate method of Connection.py.  There's some explanation for this
> that has to do with consistency of data but I don't know it; at least I
> dont know it well enough to explain it competently.
>
> Note that if you're patient enough, you might be able to take the
> consistency hit (whatever it is) and make use of the
> LowConflictConnection class that ships with CoreSessionTracking 0.9..
> see the CST code to see how it's used.

I've been looking into the standard setstate() method of Connection - and I 
have a couple of questions:

 1. where is _invalid defined? I grepped the Zope source, and can't find it 
anywhere. I'm curious as to the meaning of _invalid(None).
 2. _p_independent is a very interesting little method. It's only used in one 
place, as far as I can tell (BTrees/Length.py). If it truly did do what it 
says it's supposed to do - state that an object doesn't affect or rely on 
other objects, then you'd be able to tack a _p_independent() returning 1 onto 
your classes that use LowConflictConnection. I think. As it is, it seems that 
it's only checked for the latter statement - that the object doesn't care 
about the state of other objects.

Hrm. I think I'll stop delving into the ZODB. I'm starting to get bad 
feelings.


     Richard