[ZODB-Dev] ZEO Client cache invalidation?

Christian Robottom Reis kiko@async.com.br
Thu, 5 Jul 2001 15:09:00 -0300 (BRT)


On Thu, 5 Jul 2001, Jeremy Hylton wrote:

> The "certain communications" that you refer to are invalidation messages,
> which can only be handled at transaction boundaries.  If they were handled
> as they were received, the client could see an inconsistent view of the
> database.

Right.

> As I understand sync() -- and I may be wrong -- it's necessary when you
> start a transaction after an idle period.  If you finish one transaction and
> immediately start another, there should be no pending invalidations.  If
> there's a long delay between the end of one transaction and the start of the
> next, the invalidation messages will get queued up waiting for the next
> commit/abort.

Or if you don't have a transaction currently open, which is my case - my
client does read-only queries, and it wasn't picking up the change. Is
calling begin() really necessary, or do we auto-begin() one on any
persisted object modification?

As a sidenote: I've noticed an object only gets self._p_changed == 1 after
being committed for the first time. After committing, it gets _p_oid and
it's _p_changed finally behaves normally. Quite interesting mechanics.
Jim should get an Oscar or something. :-)

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