[ZODB-Dev] ZEO and commits

Christian Robottom Reis kiko at async.com.br
Mon Oct 27 11:13:03 EST 2003


On Mon, Oct 27, 2003 at 09:59:33AM +0100, Antonio Beamud Montero wrote:
> El vie, 24-10-2003 a las 19:01, Christian Robottom Reis escribió:
> > > This acts like a lock, no?
> > 
> > No, and there is no locking primitive in the ZODB -- concurrent writes
> > must resolve a conflict or fail.
> 
> Only when ZODB raises me an exception?

Well, ithe ZODB will initially attempt to initiate conflict resolution,
but if that isn't implemented (or fails) you'll end up with an
exception.

> > Well, commit(1) won't help you here; however, the root of your problem
> > here seems that you are/will be running into conflicts, and no measure
> > of sync()ing will help you once you've reached a conflict.
> 
> The only approach is programming the code with the conflict exception in
> mind no? Exists a library wrapper that make this more easy? I think this
> can be a common pattern of zeo use...

I don't think the ZODB was designed initially for highly concurrent
transactions. I haven't implemented any _p_resolveConflict methods
myself, though -- I never actually ran into a conflict that I *needed*
to resolve (beyond aborting and restarting the transaction manually).

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331



More information about the ZODB-Dev mailing list