[ZODB-Dev] ZEO for GUI applications

Dieter Maurer dieter at handshake.de
Sun Apr 1 15:00:11 EDT 2007


Robert Gravina wrote at 2007-4-1 00:31 +0900:
> ...
>Woohoo! I realised Connection.sync() does exactly what I need, but  
>this still doesn't work as expected.
>
>class UpdatedDB(DB):
>     def invalidate(self, tid, oids, connection=None, version=''):
>         DB.invalidate(self, tid, oids, connection, version)
>         if connection is not None:
>             connection.sync()
>
>Am I going about this the right way?

Recently, Chris Withers reported a strange "AssertionError"
after a call of "loadBefore". The following discussion lead to the
conclusion that the current ZODB code (its MVCC part) may not allow to call
"invalidate" when the objects was not modified.

If, on the other hand, the object was modified, "invalidate" is
called automatically. No need to do it yourself.


Furthermore, be aware that "Connection.sync" aborts the current transaction.


-- 
Dieter


More information about the ZODB-Dev mailing list