[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.73.2.23.2.2

Tim Peters tim.one at comcast.net
Wed Jun 11 00:19:45 EDT 2003


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

Modified Files:
      Tag: tim-loading_oids_status-branch
	ClientStorage.py 
Log Message:
_process_invalidations():  More comments, at least enough so that I
think I can remember why this bizarre code is here next week.


=== ZODB3/ZEO/ClientStorage.py 1.73.2.23.2.1 => 1.73.2.23.2.2 ===
--- ZODB3/ZEO/ClientStorage.py:1.73.2.23.2.1	Tue Jun 10 18:57:12 2003
+++ ZODB3/ZEO/ClientStorage.py	Tue Jun 10 23:19:44 2003
@@ -975,8 +975,16 @@
                 # Set invalidation flag for this (oid, version) pair.
                 stuff = self._loading_oids_status.get(pair)
                 if stuff:
+                    # load() is waiting for this.  Keep the load count
+                    # the same, but clear the "no invalidations seen"
+                    # flag.  This trick is necessary because zrpc invokes
+                    # invalidateTrans() immediately when an invalidation
+                    # arrives, but may not deliver the result of a load
+                    # until later, even if the load request preceded
+                    # the invalidation msg.
                     self._loading_oids_status[pair] = stuff[0], 0
                 else:
+                    # load() isn't waiting for this.  Simply invalidate it.
                     self._cache.invalidate(oid, version=version)
 
             if self._db is not None:




More information about the Zodb-checkins mailing list