[ZODB-Dev] Re: Webkit Threading and ZODB 3.3a2: problems on Windows

Dieter Maurer dieter at handshake.de
Sat Feb 21 04:56:22 EST 2004


Christian Robottom Reis wrote at 2004-2-20 14:36 -0300:
> ...
>> Hmm, maybe a get_transaction().ismodifed() method that returned True if
>> there were changes made in the transaction would be useful as a public
>> API?
>> 
>> Or, a crazier idea, may the transaction object should be iterable (or
>> have a method that returns an iterator) of the modified objects in the
>> transaction?
>
>Well, I raised this issue a bit back, and right now I'm curious: how do
>you find out what objects were modified in subtransactions? If that's
>easy to discover, then adding API (is_modified() or whatever) is the
>trivial part.

The transaction is able to detect whether there is work to do
in a final commit/abort. Thus, it could provide this information
via an API method.

*BUT* I doubt that any appliciation should need this information.

  The appliciation should instead call "commit" or "abort" (whatever
  is more appropriate).

  It would be unnecessary complexity (and overhead) to make
  the calls conditional on whether or not "commit/abort" would
  really do something.

Keep it as simple as possible!

-- 
Dieter



More information about the ZODB-Dev mailing list