[Zodb-checkins] CVS: ZODB3/ZEO - StorageServer.py:1.101.2.1 ClientStorage.py:1.110.2.1

Jeremy Hylton jeremy at zope.com
Thu Oct 9 16:27:26 EDT 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	StorageServer.py ClientStorage.py 
Log Message:
Partial conversion of ZEO to use new protocol that passes tid with
invalidations.

There are still many places to thread this through the
implementation.  Once concern is how to handle invalidations that
happen through the fallback cache verification mechanism.


=== ZODB3/ZEO/StorageServer.py 1.101 => 1.101.2.1 ===
--- ZODB3/ZEO/StorageServer.py:1.101	Thu Oct  2 18:14:02 2003
+++ ZODB3/ZEO/StorageServer.py	Thu Oct  9 16:27:25 2003
@@ -269,7 +269,7 @@
         try:
             os = self.storage.getSerial(oid)
         except KeyError:
-            self.client.invalidateVerify((oid, ''))
+            self.client.invalidateVerify((None, oid, ''))
             # XXX It's not clear what we should do now.  The KeyError
             # could be caused by an object uncreation, in which case
             # invalidation is right.  It could be an application bug


=== ZODB3/ZEO/ClientStorage.py 1.110 => 1.110.2.1 ===
--- ZODB3/ZEO/ClientStorage.py:1.110	Thu Oct  2 14:17:22 2003
+++ ZODB3/ZEO/ClientStorage.py	Thu Oct  9 16:27:25 2003
@@ -919,7 +919,7 @@
             try:
                 self._update_cache()
                 if f is not None:
-                    f()
+                    f(tid)
             finally:
                 self._lock.release()
             self._cache.setLastTid(tid)
@@ -1044,7 +1044,7 @@
             return
         self._pickler.dump(args)
 
-    def _process_invalidations(self, invs):
+    def _process_invalidations(self, tid, invs):
         # Invalidations are sent by the ZEO server as a sequence of
         # oid, version pairs.  The DB's invalidate() method expects a
         # dictionary of oids.
@@ -1061,7 +1061,7 @@
 
             if self._db is not None:
                 for v, d in versions.items():
-                    self._db.invalidate(d, version=v)
+                    self._db.invalidate(tid, d, version=v)
         finally:
             self._lock.release()
 
@@ -1093,7 +1093,7 @@
             for t in args:
                 self._pickler.dump(t)
             return
-        self._process_invalidations(args)
+        self._process_invalidations(tid, args)
 
     # The following are for compatibility with protocol version 2.0.0
 




More information about the Zodb-checkins mailing list