[ZODB-Dev] BTree corrupted after conflict resolution
Christian Robottom Reis
kiko at async.com.br
Thu Mar 4 09:18:46 EST 2004
On Wed, Mar 03, 2004 at 08:08:20PM -0500, Jeremy Hylton wrote:
> > > 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.?
>
> _p_conflictResolution should really be a staticmethod, but it was
> invented before Python had staticmethods. That is, the method is passed
> three object states but it isn't supposed to access self. Furthermore,
> it only sees a single object state, it does not have access to the state
> of any other first-class persistent objects.
>
> Perhaps we should define an __cmp__() method that raises an error on the
> stub objects that conflict resolution provides.
Well, wouldn't that just be a roundabout way of making it explicit that
nothing but simple types can be used as BTree keys (since no custom
__cmp__ can be provided), or are you considering the zero-concurrency
situation? :-)
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
More information about the ZODB-Dev
mailing list