[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.73.2.7.2.13
Guido van Rossum
guido@python.org
Thu, 19 Dec 2002 11:52:18 -0500
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv29157
Modified Files:
Tag: ZODB3-fast-restart-branch
ClientStorage.py
Log Message:
When invalidateTransaction() is called during cache verification, dump
the invalidation in the pickler that the cache verification process is
using. This avoids AttributeError('_get') in the cache.
=== ZODB3/ZEO/ClientStorage.py 1.73.2.7.2.12 => 1.73.2.7.2.13 ===
--- ZODB3/ZEO/ClientStorage.py:1.73.2.7.2.12 Wed Dec 18 22:50:13 2002
+++ ZODB3/ZEO/ClientStorage.py Thu Dec 19 11:52:17 2002
@@ -210,6 +210,8 @@
self._connection = None
# _server_addr is used by sortKey()
self._server_addr = None
+ self._tfile = None
+ self._pickler = None
self._info = {'length': 0, 'size': 0, 'name': 'ZEO Client',
'supportsUndo':0, 'supportsVersions': 0,
@@ -825,6 +827,7 @@
if self._pickler is None:
return
self._pickler.dump((0,0))
+ self._pickler = None
self._tfile.seek(0)
unpick = cPickle.Unpickler(self._tfile)
f = self._tfile
@@ -841,6 +844,12 @@
def invalidateTransaction(self, tid, args):
"""Invalidate objects modified by tid."""
self._cache.setLastTid(tid)
+ if self._pickler is not None:
+ self.log("Transactional invalidation during cache verification",
+ level=zLOG.BLATHER)
+ for t in args:
+ self.self._pickler.dump(t)
+ return
db = self._db
for oid, version in args:
self._cache.invalidate(oid, version=version)