On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken <do3cc...@googlemail.com> wrote: > On Thu, May 20, 2010 at 14:18, Jürgen Herrmann > <juergen.herrm...@xlhost.de>wrote: > >> >> hi there! >> >> as our zope2 zodb grows we experience more and more conflicts >> with long running transactions. so i'm going to rewrite these >> methods to commit transactions in batches - here my attempt >> to tackle this problem. the idea is to get a list of objects >> to be modified in this transaction, break it down to batches >> and commit after each batch was processed. to avoid zope's >> retry-on-conflict machinery and still have a chance to retry >> per batch transaction commits, the iteration over one batch >> is guarded by a try:except ConflictError: and a retry logic. >> > > Zope already has its own retry mechanism, maybe you might want to > call your long running method multiple times, each time working on the > next batch. > in fact zope's retry machinery is kicking in too often which is a bad thing if the retried transaction runs for say 30min or so.
having to gather the list of objects outside of zope, doing the batching there and calling into zope multiple times - i wanted to avoid that. i'd like to have all the logic contained in one zope method for the sake of simplicity on the caller's side (most of these are kicked off by cron jobs). jürgen -- >> XLhost.de - eXperts in Linux hosting ® << XLhost.de GmbH Jürgen Herrmann, Geschäftsführer Boelckestrasse 21, 93051 Regensburg, Germany Geschäftsführer: Volker Geith, Jürgen Herrmann Registriert unter: HRB9918 Umsatzsteuer-Identifikationsnummer: DE245931218 Fon: +49 (0)800 XLHOSTDE [0800 95467833] Fax: +49 (0)800 95467830 WEB: http://www.XLhost.de IRC: #xlh...@irc.quakenet.org _______________________________________________ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )