[ZODB-Dev] Conflict Error

Chris Withers chris at simplistix.co.uk
Mon Feb 27 15:19:34 EST 2006


Antonio Beamud Montero wrote:
> Where Status is a Persistent Class, with an OOBTree attribute called
> _dict, and serveral methods wrapping this _dict, like add, remove, etc..

OOBTree's have conflict resolution code which will try and do the right 
thing instead of raising a ConflictError...

> When several threads try to add to a the 'completed' dict, a conflict
> error arises, 

Well, yes, what did you expect?

> but if I use distinct keys...

Then what? I'd guess the OOBTree conflict resolution code helps you out 
here :-)

> why happens? Can be by using
> the Status class around dict?

Sorry, can't understand any of that...

> A persistent object (inerith from Persistent) has a simple way to force
> a sync()?

No, look at the "transaction" package for what you want to be doing here...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the ZODB-Dev mailing list