[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.110.2.12
Jeremy Hylton
jeremy at zope.com
Wed Dec 24 00:33:58 EST 2003
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv5681
Modified Files:
Tag: ZODB3-mvcc-2-branch
ClientStorage.py
Log Message:
Make sure setLastTid() is always called with lock held.
=== ZODB3/ZEO/ClientStorage.py 1.110.2.11 => 1.110.2.12 ===
--- ZODB3/ZEO/ClientStorage.py:1.110.2.11 Tue Dec 23 14:05:57 2003
+++ ZODB3/ZEO/ClientStorage.py Wed Dec 24 00:33:56 2003
@@ -961,10 +961,9 @@
self._update_cache(tid)
if f is not None:
f(tid)
+ self._cache.setLastTid(tid)
finally:
self._lock.release()
- # XXX Shouldn't this cache call be made while holding the lock?
- self._cache.setLastTid(tid)
r = self._check_serials()
assert r is None or len(r) == 0, "unhandled serialnos: %s" % r
@@ -1113,7 +1112,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