[ZODB-Dev] Re: Subtransactions, cacheMinimize()

Michel Pelletier michel@zope.com
Fri, 02 Nov 2001 09:48:42 -0800


Chris Withers wrote:
> 
> Michel Pelletier wrote:
> >
> >   - commit subtransactions instead of transactions every % 1000.
> 
> What's the difference here? I always assumed that in a situation like this you
> might as well do full transactions rather than subtransactions since you can
> choose the number of operations before committing anyway.
> 
> Is that an incorrect assumption?

No, I was just turning the knobs I knew about.

> > I think the problem is, when you pass 0 as a argument it runs in the
> > following code in cPickleCache.c:
> 
> yup, someone else pointed that out to me when i first started hitting these
> problems :-(
> 
> > This value is then passed into gc_item
> > for each object in the cache which does nothing if dt is logicaly false
> > (see line 155 in cPickleCache.c).
> 
> Why is that behaviour needed?

Dunno.  It can certainly be fixed.  If Jeremy thinks so I would say go
ahead and fix it.  I don't know why the age is divided by three and thus
floored to zero for values 1 and 2.

-Michel