[ZODB-Dev] simple example of undo( )

Christian Reis kiko@async.com.br
Tue, 24 Sep 2002 17:12:52 -0300


On Mon, Sep 23, 2002 at 09:54:42PM -0400, Jeremy Hylton wrote:
> Remember, I'm recommending to call sync() immediately after a
> transaction commit.

Yep, I see your point, and you're right. It should be done
automatically. Can this be changed?

>   CR> That's a good point. So transactions are atomic in the sense
>   CR> that a per-instance rollback/undo isn't really possible? The
>   CR> transaction *does* know what instances have been changed,
>   CR> though, doesn't it?
> 
> Yes to both questions.  A transaction is an all or nothing affair.
> Think about the classic banking example.  Would you want to undo half
> of the account transfer transaction?  You can't guarantee consistency
> unless you respect transaction boundaries.

Yep. This is much clearer to me now, thanks.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL