Chris Bainbridge wrote:
Hi Alan,
  - You cant just catch ConflictError and pass


I do conn.sync() at the top of the loop which is supposed to abort the
connection and re-sync the objects with the zeo server.

Urm, sounds like you're looking for transaction.abort().

Also, be aware of the weirdness that can occur if you run ZEO clients without an asyncore loop. These can lead you to need to call .sync()...

  - I think you can catch a ReadConflictError and *retry* that is ok.

Eep, in this day and age you shouldn't be seeing any of these ;-)

- But a ConflictError needs to be *retried* manually in your client code.

Yup, abort the transaction and try again...

afaik, this may be better coding style, but isn't actually required,
since doesn't each commit implicitly begin a new transaction?

Urm, the abort and possibly the .sync are absolutely necessary to get all the objects back into a sane, consistent state...

Chris

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

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to