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

Jeremy Hylton jeremy at zope.com
Tue Dec 30 17:29:28 EST 2003


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

Modified Files:
	ClientStorage.py 
Log Message:
Fix one locking glitch, add comment about the other.


=== ZODB3/ZEO/ClientStorage.py 1.114 => 1.115 ===
--- ZODB3/ZEO/ClientStorage.py:1.114	Fri Dec 26 16:05:43 2003
+++ ZODB3/ZEO/ClientStorage.py	Tue Dec 30 17:29:27 2003
@@ -587,6 +587,7 @@
         self._pickler.fast = 1 # Don't use the memo
 
         # XXX should batch these operations for efficiency
+        # XXX need to acquire lock...
         for oid, tid, version in self._cache.contents():
             server.verify(oid, version, tid)
         self._pending_server = server
@@ -1098,7 +1099,11 @@
 
     def invalidateTransaction(self, tid, args):
         """Invalidate objects modified by tid."""
-        self._cache.setLastTid(tid)
+        self._lock.acquire()
+        try:
+            self._cache.setLastTid(tid)
+        finally:
+            self._lock.release()
         if self._pickler is not None:
             log2(BLATHER,
                  "Transactional invalidation during cache verification")




More information about the Zodb-checkins mailing list