Difficulties with MVCC implementation
was: [ZODB-Dev] Potential BTrees splitting bug
Dieter Maurer
dieter at handshake.de
Thu Sep 25 11:23:23 EDT 2003
Dieter Maurer wrote at 2003-9-25 15:35 +0200:
> Tim Peters wrote at 2003-9-24 23:18 -0400:
> > ...
> > The same kind of thing could happen if a subtle flaw in an MVCC
> > implementation delivered a stale value for the parent BTree node of the
> > bucket that split, which is why I'm especially keen to see whether the
> > problem goes away if that patch goes away.
>
> You have been right:
>
> Disabling the "MVCC" mode let the test pass...
I found the likely cause for the test failure: the limited
time resolution.
The idea behind my MVCC implementation is to deliver the state
as it has been at transaction start.
Due to the limited time resolution, the transaction start
cannot be determined precisely but only within the resolution limit.
As a consequence, we cannot trust a state defined near the transaction
start. I will have to raise a "ReadConflictError" in this case.
Hopefully, the ZODB ensures that different transaction commits get
different serials (as this is necessary to detect the need for
conflict resolution). In this case, a more elegant solution
might be possible, synchronizing transaction start time with
last transaction serials picky-packed in invalidation messages.
However, this would require a protocol change (beside other problems
such as coordinating multiple connections).
Dieter
More information about the ZODB-Dev
mailing list