[ZODB-Dev] ZEO with Zope 2.7b2

Dieter Maurer dieter at handshake.de
Sun Nov 16 13:37:23 EST 2003


Joachim Werner wrote at 2003-11-14 19:41 +0100:
 > I'm using Zope 2.7b2 in a ZEO configuration. Everything works fine, but 
 > there is one annoying thing that becomes obvious when I run Zope using
 > "bin/runzope":
 > 
 > After connecting to the ZEO server it seems to check the cache against 
 > the ZEO server or so:
 > 
 > ...
 > 
 > 2003-11-14T21:30:21 TRACE(-300) zrpc-conn:cms1:9000 wait(130): 
 > asyncore.poll(0.002)
 > ------
 > 2003-11-14T21:30:21 TRACE(-300) zrpc-conn:cms1:9000 recv msg: 130, 0, 
 > .reply, ('((U\x0bPersistenceq\x01U\x11PersistentMappingq\x02tq\x0......
 > ...
 > 
 > This goes on for quite a while (several seconds).

The quoted part of your log file does not look like verification
messages (but like object state load replies).

However, there is a verification stage when the client connects
to a server.

 > For running Zope in a test/debug scenario this can be really annoying 
 > because it makes restarts take very long.
 > 
 > My questions:
 > 
 > - What exactly is that about?

A ZEO client has a ZEO client cache (on disk) maintaining state
information for recently loaded objects.

In normal operation, the server sends invalidation messages to its
clients when some object changes. Of course, it can only send
invalidations to connected clients.

When a client reconnects, it may have missed some invalidations
and therefore have an inconsistent cache. To check for this,
it sends cache verification requests to the server.
It seems that this part of the protocol is not much optimized
in ZODB 3.1. It takes quite long.

 > - Can I switch that off?

When you do not define "ZEO_CLIENT", a temporary file is used
as client cache. Therefore, validation on startup will be
very fast (as the cache is empty).

 > In general, is there a place where I can find the more advanced options 
 > to configure ZEO (client-side) in the zope.conf? Like not using a 
 > persistent cache etc.?

I look at the (instructive and comprehensive!) docstring of
"ZEO.ClientStorage.ClientStorage.__init__".
This is not a bad place for this kind of documentation ;-).

-- 
Dieter



More information about the ZODB-Dev mailing list