[ZODB-Dev] ZEO and commits
Antonio Beamud Montero
antonio.beamud at linkend.com
Tue Oct 28 05:51:46 EST 2003
El lun, 27-10-2003 a las 17:17, Christian Robottom Reis escribió:
> On Mon, Oct 27, 2003 at 12:33:38PM +0100, Antonio Beamud Montero wrote:
> > I need a sync to update my local copy of the object, because making a
> > commit not produce any Conflict situation... My experiencie is the next
> > process A <----------------- ZEO -----------------> process B
> > ------------ ------------
> > create Object X
> > ... make changes in X
> > sync() ....
>
> This sync() will do nothing unless process B has commited first. Do you
> have a commit() missing after create Object X there?
When I make changes in X in process B I have make several commits.
> > my X copy .....
> > commit()
> > ..... nothing conflicts .....
> > commit X changes
> > nothing conflicts
> >
> > Is this normal? When B tries to make commit X changes wouldn't raise a
> > conflict? I'm a bit confused... Seems like the commit is only propagated
>
> I can't see how B's final commit doesn't conflict with A's final
> conflict. It raises a ConflictError, most certainly, unless you initiate
> your transaction *after* A has committed.
>
> You may be doing something slightly different than what you say you're
> doing <wink>.
I will review all my code again... Thanks.
> > in the local cache copy of the object... I need to make several sync
> > call's in the B process to produce the conflict...?
>
> No, you don't -- the ZODB will raise conflicts for you.
>
> Ah, for an example _p_resolveConflict, see the BTrees Length class --
> it's very simple, and easy to figure out.
>
> Take care,
> --
> Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
--
Antonio Beamud Montero <antonio.beamud at linkend.com>
More information about the ZODB-Dev
mailing list