[ZODB-Dev] Re: [Zope-dev] Conflict reduced BTrees for catalogin

Jeremy Hylton jeremy@zope.com
17 Mar 2003 12:13:34 -0500


On Fri, 2003-03-14 at 16:51, Dieter Maurer wrote:
> I have abandoned the "_p_independent for BTrees" route and
> will go for "ReadCommitted" isolation level.
> This provides for much clearer semantics.

I believe this is just a terminology issue, but I better mention it in
case one of us is missing something.  The ANSI isolation levels don't
map exactly onto the optimistic scheme ZODB uses.  But I think it's safe
to say that ZODB supports read committed now, but does not support
repeatable read.  The way ZODB works, it's impossible to read
uncommitted data.  But it is possible to read an object by loading it
from the cache, and thus get an older committed version of the object
than if you had read it by loading it from the database.

The solution is to add a read state to the persistent object state
chart.  In the short term, you can raise a ReadConflictError when there
is a transition from unmodified to read and the object has been
invalidated.  In the long term, the read state could be used to
implement a database that supported serializability by storing the read
state in the database.

Jeremy