[ZODB-Dev] ZEO and commits
Christian Robottom Reis
kiko at async.com.br
Mon Oct 27 11:17:51 EST 2003
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?
> 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>.
> 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
More information about the ZODB-Dev
mailing list