[Zope-Checkins] CVS: ZODB3/ZEO - ClientStub.py:1.10.2.1

Jeremy Hylton jeremy@zope.com
Thu, 5 Jun 2003 18:43:07 -0400


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv14016/ZEO

Modified Files:
      Tag: ZODB3-3_1-branch
	ClientStub.py 
Log Message:
Make sure invalidations are sent atomically by the ZEO server.

Extend zrpc with a way to call a method without also calling poll() to
do I/O.  The I/O is undesirable because it could allow a load from a
client to sneak in before the invalidation is sent.  The I/O is
unnecessary because the caller will return to the mainloop and do the
I/O when all the invalidations are sent.

Patch from Guido.


=== ZODB3/ZEO/ClientStub.py 1.10 => 1.10.2.1 ===
--- ZODB3/ZEO/ClientStub.py:1.10	Tue Oct  1 14:38:22 2002
+++ ZODB3/ZEO/ClientStub.py	Thu Jun  5 18:42:36 2003
@@ -53,7 +53,11 @@
         self.rpc.callAsync('end')
 
     def invalidateTrans(self, args):
-        self.rpc.callAsync('Invalidate', args)
+        # The I/O is undesirable because it could allow a load from a
+        # client to sneak in before the invalidation is sent.  The I/O
+        # is unnecessary because the caller will return to the
+        # mainloop and do the I/O when all the invalidations are sent.
+        self.rpc.callAsyncNoPoll('Invalidate', args)
 
     def serialnos(self, arg):
         self.rpc.callAsync('serialnos', arg)