[ZODB-Dev] List of modified objects

Dieter Maurer dieter at handshake.de
Wed Dec 8 13:18:05 EST 2004


Tim Peters wrote at 2004-12-7 16:10 -0500:
> ...
>I'll record this as saying you're in favor of a new API call that ... does
>what?  It's a method on transaction objects?  Returns true if and only if
>some object has been modified by the transaction?  If so, should it return
>true if the only modified objects at the time were committed in a (one or
>more) subtxn?

I think that subtransactions are of almost no interest at all --
especially after checkpoints have been implemented (have they?).

For me, this implies: when I ask a transaction about modified
objects, then I mean all objects modified by this transaction,
whether or not they have been committed by a subtransaction.

*IF* subtransactions are still essential, then the API can
use a subtransaction parameter (as for "commit/abort") to
distinguish whether the specific call means the current transaction
or subtransaction.

> Do you also/instead want a new API call on resource managers
>(Connections) that returns true if and only if some object obtained from the
>resource manager has been modified?

Personally, I never met a need to know whether a transaction
(or resource manager) actually modified some objects.

In an earlier message, I strongly advocated not to check
whether a transaction modified or not any objects but just
to commit/abort the transaction.


Despite my criticism about the convoluted code to check whether
an iterator will return any value, I do not think that
a method is necessary returning whether there are modified objects.

-- 
Dieter


More information about the ZODB-Dev mailing list