[ZODB-Dev] ZEO and commits
Antonio Beamud Montero
antonio.beamud at linkend.com
Tue Oct 28 05:34:15 EST 2003
Well, _p_resolveConflict doesn't works for me:
I have written some example code:
Execute in order -> client1.py, (1 second) client2.py
To execute ZEO:
python /usr/lib/python2.3/site-packages/ZEO/start.py -p 60007
/tmp/foo.dat
Am I doing something wrong?
Thanks
El lun, 27-10-2003 a las 19:26, Stefan H. Holek escribió:
> A state argument basically contains the __dict__ of the object experiencing
> a conflict.
>
> oldState ..... the state of when your transaction started
> savedState ... the state another thread persisted since
> your transaction started.
> newState ..... the state your transaction attempted to persist
> when it triggered the conflict error.
>
> oldState is here so you have a clean state to start from, savedState and
> newState are the ones competing for "finalState".
>
> Your resolution code may now look something like:
>
> def _p_resolveConflict(self, oldState, savedState, newState):
> intermediateState = merge(oldState, savedState)
> finalState = merge(intermediateState, newState)
> return finalState
>
> If you cannot resolve the conflict, raise a ConflictError.
>
> hth,
> Stefan
>
>
>
> --On Montag, 27. Oktober 2003 10:39 +0100 Antonio Beamud Montero
> <antonio.beamud at linkend.com> wrote:
>
> > I suppose I need to use the _p_resolveConflict() method but where I can
> > see more examples? The documentation is very short...
>
>
> --
> The time has come to start talking about whether the emperor is as well
> dressed as we are supposed to think he is. /Pete McBreen/
--
Antonio Beamud Montero <antonio.beamud at linkend.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client1.py
Type: text/x-python
Size: 652 bytes
Desc: not available
Url : http://lists.zope.org/pipermail/zodb-dev/attachments/20031028/fe849ed9/client1.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client2.py
Type: text/x-python
Size: 652 bytes
Desc: not available
Url : http://lists.zope.org/pipermail/zodb-dev/attachments/20031028/fe849ed9/client2.py
More information about the ZODB-Dev
mailing list