[ZODB-Dev] BTree corrupted after conflict resolution
John Belmonte
john at neggie.net
Wed Mar 3 19:34:52 EST 2004
Dieter Maurer wrote:
> John Belmonte wrote at 2004-3-3 08:55 -0500:
>
>>... "__cmp__" not called during conflict resolution ...
>
> Maybe, I understand the problem:
>
> During conflict resolution the state does not contain
> the persistent subobjects themselves but only references.
>
> Therefore, your "__cmp__" cannot be used to compare
> the persistent subobjects. Almost surely, the default
> "__cmp__" is used which is, of course, wrong and
> can lead to corruption.
It seems you are right. If I change the key class to a second-class
object, the problem goes away.
> Almost surely, we must add a further restriction for BTrees:
> the keys must not be persistent objects.
I think that would be an unreasonable restriction. If the server
context can access the _p_conflictResolution method of a class, why not
__cmp__, etc.?
-John
--
http:// if ile.org/
More information about the ZODB-Dev
mailing list