[ZODB-Dev] Quick ZODB connection synch question

Jeremy Hylton jeremy at zope.com
Fri Sep 26 15:17:25 EDT 2003


On Fri, 2003-09-26 at 15:05, John Belmonte wrote:
> Dieter Maurer wrote:
> > The ZODB processes invalidation requests for a connection only
> > 
> >   *  when the connection is opened
> >   
> >   *  when you commit or abort a transaction *AND* this transaction
> >      has at least one object modified from this connection (such
> >      that the connection is registered with the transaction)
> > 
> >   *  you call "connection.sync".
> 
> But the docs mention something about an asyncore main loop.  How does 
> that fit in?

It has to do with invalidations sent by the ZEO server.   If you have an
asyncore mainloop running, invalidations will be handled automatically
as they are received.  If you app doesn't have a mainloop, then it won't
read those invalidations unless you explicitly call sync to read data
from the network; the invalidations will just pile up in the socket
buffer waiting for the app to read them.

Jeremy





More information about the ZODB-Dev mailing list