[ZODB-Dev] conflict resolution for PersistentList

Diez Roggisch d.roggisch at ehotel.de
Tue May 25 17:37:38 EDT 2004


>     http://mail.zope.org/pipermail/zodb-dev/2004-May/007372.html

Oops, yes, somehow missed that. 

> I suspect people are stumbling over what "such a case" means, exactly.  I
> really didn't understand what you were trying to accomplish, so I'm
> probably projecting that on to everyone else too.

The case is simply to have a one-to-many relationship with a defined order of 
the childs based on the order of insertion - something I'd create with a 
oracle sequence or auto-increments in the sql-world. 

> But you still shouldn't have seen *inconsistent* data.  That's another
> mystery here.

I don't have inconsistent data - its just that the thread that committed first 
has the list of childs written, while the second ones data is lost. First 
that went unnoticed due to the broken exception handling. 

Then I didn't manage to resolve the conflict on the ParentData. But as code is 
the best documentation, I'll stop elaborating on that and publish my example 
tomorrow :)

> Most people here get more done when they're not at work <0.5 wink>.

While thats sometimes true for me too, I don't have my example here, and can't 
reach the machine in the company... damn NAT.

> I can't guess, because (as above) I'm not clear on what the problem/goal
> is. If BTrees don't seem like the right answer to you when you get back to
> this, perhaps you could explain more about what the problem is.

They most probably are the right answer, as it seems by now - its just that I 
wanted some implicit order on my childs and thought that a list would give me 
that. But I'm pretty convinced now that this is not the case, and that I 
should go for the tree with some monotone key sequence generator.  I read the 
link Chis suggested with your conflict-resolution scheme explanation, and it 
looks like thats perfect for me, as I don't plan to delete anything and need 
distinct keys for every child added to my parent anyway.

Thanks for the help so far,

Diez



More information about the ZODB-Dev mailing list