[Zope3-dev] Re: [ZODB-Dev] revise transaction API

Christian Robottom Reis kiko at async.com.br
Sat Jun 12 11:42:11 EDT 2004


On Tue, Mar 30, 2004 at 03:42:21PM -0500, Jim Fulton wrote:
> Christian Robottom Reis wrote:
> 
> ...
> 
> >    - Shouldn't the Extended transaction API describe ways to get the
> >      changes participating in the transaction? Something like
> >      get_modifications() (that might in the ZODB case return OIDs which
> >      are materialized by the resource manager)?
> 
> ...
> 
> >    3. getting all modified objects (inclusing those in subtransactions).
> 
> What would this be used for?  This is pretty hard to do for RDBMSs and
> other psuedo transactional things, like LDAP connections and mail
> systems.

In one of our systems, I "earmark" all objects changed with an easily
queryable "last_changed_time" attribute. It's a lot easier to do this on
"the way out" than to wire up __setattr__s on all the objects involved.

The other reason is for simple debugging -- sometimes when looking at a
process that does many changes, it's interesting to see how much of the
database has been touched. I've used this to study the indexing
mechanics in IC, and also when trying to find out at what point certain
objects were modified.

These examples aren't contrived, but they may not be common in a
traditional Zope application.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331



More information about the ZODB-Dev mailing list