[ZODB-Dev] Subtransaction backward compatibility
Tim Peters
tim at zope.com
Tue Aug 23 15:07:37 EDT 2005
[Dieter]
>>> 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.
>>
[Tim]
>> Jim, was the latter intentional? It surprised me when Dieter pointed it
>> out, and in the ZODB NEWS file I explicitly implied <wink> otherwise.
[Jim]
> 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
it.
> 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.
More information about the ZODB-Dev
mailing list