>>> Subtransactions used to be used for two purposes:
>>>  *  ensure that newly created objects get "_p_" attributes
>>>     (especially "_p_jar" and "_p_oid")
>>>  *  release memory in the mid of large transactions
>>>     (i.e. reading and/or writing large amounts of objects)
>>> With ZODB 3.4, subtransactions are implemented as savepoints. They can
>>> still be used for the first purpose. But, they no longer start cache
>>> garbage collection.

>> Jim, was the latter intentional?  It surprised me when Dieter pointed it
>> out, and in the ZODB NEWS file I explicitly implied <wink> otherwise.

> Later what?

Dieter made two claims; "the latter" claim is the second claim, i.e., about
cache gc.

> Assuming that we no longer call incrgc, that would be an oversight.
> When a connection does a savepoint, it should also do an incrgc.

OK, that's what I figured the intent was.  It's not being done now; I'll fix

> Note that applications that *really* want to reduce memory after a
> savepoint may and often should make explicit cache-management calls on
> the transaction.  This should still work.

I tried it -- it does work ;-).  Making a savepoint alone currently does not
trigger any cache gc.

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to