[Zope-Checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.73.2.7.2.1 ServerStub.py:1.9.22.1 StorageServer.py:1.74.2.6.4.1
Guido van Rossum
guido@python.org
Tue, 17 Dec 2002 13:08:00 -0500
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv27591
Modified Files:
Tag: ZODB3-fast-restart-branch
ClientStorage.py ServerStub.py StorageServer.py
Log Message:
Checkpoint commit (unfinished code, beware!) -- save and test for last
invalidated transaction ID before starting cache validation.
=== ZODB3/ZEO/ClientStorage.py 1.73.2.7 => 1.73.2.7.2.1 ===
--- ZODB3/ZEO/ClientStorage.py:1.73.2.7 Mon Dec 9 15:52:26 2002
+++ ZODB3/ZEO/ClientStorage.py Tue Dec 17 13:07:59 2002
@@ -234,6 +234,9 @@
self._tpc_cond = threading.Condition()
self._transaction = None
+ # Transaction id of last invalidation (either ours or received)
+ self._last_inval_tid = None
+
# Prevent multiple new_oid calls from going out. The _oids
# variable should only be modified while holding the
# _oid_lock.
@@ -393,6 +396,9 @@
"""Internal routine called to verify the cache."""
# XXX beginZeoVerify ends up calling back to beginVerify() below.
# That whole exchange is rather unnecessary.
+ if self._last_inval_tid is not None:
+ if server.lastTransaction() == self._last_inval_tid:
+ return # No need to verify the cache
server.beginZeoVerify()
self._cache.verify(server.zeoVerify)
server.endZeoVerify()
@@ -679,6 +685,7 @@
assert r is None or len(r) == 0, "unhandled serialnos: %s" % r
self._update_cache()
+ self._last_inval_tid = self._serial
finally:
self.end_transaction()
=== ZODB3/ZEO/ServerStub.py 1.9 => 1.9.22.1 ===
--- ZODB3/ZEO/ServerStub.py:1.9 Tue Oct 1 14:49:12 2002
+++ ZODB3/ZEO/ServerStub.py Tue Dec 17 13:07:59 2002
@@ -48,6 +48,9 @@
def get_info(self):
return self.rpc.call('get_info')
+ def lastTransaction(self):
+ return self.rpc.call('lastTransaction')
+
def beginZeoVerify(self):
self.rpc.callAsync('beginZeoVerify')
=== ZODB3/ZEO/StorageServer.py 1.74.2.6 => 1.74.2.6.4.1 ===
--- ZODB3/ZEO/StorageServer.py:1.74.2.6 Tue Nov 12 15:18:09 2002
+++ ZODB3/ZEO/StorageServer.py Tue Dec 17 13:07:59 2002
@@ -246,6 +246,7 @@
self.load = self.storage.load
self.loadSerial = self.storage.loadSerial
self.modifiedInVersion = self.storage.modifiedInVersion
+ self.lastTransaction = self.storage.lastTransaction
def check_tid(self, tid, exc=None):
if self.read_only: