[Zope-Checkins] CVS: ZODB3/ZEO - StorageServer.py:1.74.2.10.4.1 ClientCache.py:1.38.2.2.8.1
Jeremy Hylton
jeremy@zope.com
Thu, 12 Jun 2003 13:48:46 -0400
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv32314/ZEO
Modified Files:
Tag: jeremy-more-mysteries-branch
StorageServer.py ClientCache.py
Log Message:
Add a bunch of logging related to load/store/invalidation.
=== ZODB3/ZEO/StorageServer.py 1.74.2.10 => 1.74.2.10.4.1 ===
--- ZODB3/ZEO/StorageServer.py:1.74.2.10 Tue Apr 29 17:39:56 2003
+++ ZODB3/ZEO/StorageServer.py Thu Jun 12 13:48:45 2003
@@ -38,6 +38,7 @@
from ZODB.POSException import TransactionError, ReadOnlyError
from ZODB.referencesf import referencesf
from ZODB.Transaction import Transaction
+from ZODB.utils import u64
_label = "ZSS" # Default label used for logging.
@@ -347,6 +348,7 @@
p = s = None
else:
raise
+ self.log("load oid=%x serial=%x" % (u64(oid), u64(s)))
return p, s, v, pv, sv
def beginZeoVerify(self):
=== ZODB3/ZEO/ClientCache.py 1.38.2.2 => 1.38.2.2.8.1 ===
--- ZODB3/ZEO/ClientCache.py:1.38.2.2 Thu Nov 21 13:58:51 2002
+++ ZODB3/ZEO/ClientCache.py Thu Jun 12 13:48:45 2003
@@ -104,7 +104,7 @@
import time
import tempfile
from struct import pack, unpack
-from thread import allocate_lock
+from thread import allocate_lock, get_ident
from ZODB.utils import U64
@@ -238,6 +238,7 @@
ap = abs(p)
f.seek(ap)
h = f.read(27)
+ self.log("invalidate oid=%x serial=%x" % (U64(oid), U64(h[19:])))
if len(h) != 27:
self.log("invalidate: short record for oid %16x "
"at position %d in cache file %d"
@@ -302,6 +303,7 @@
self._trace(0x2A, oid, version, h[19:], dlen)
if (p < 0) != self._current:
self._copytocurrent(ap, tlen, dlen, vlen, h, data)
+ self.log("load oid=%x serial=%x" % (U64(oid), U64(h[19:])))
return data, h[19:]
else:
self._trace(0x26, oid, version)
@@ -527,6 +529,8 @@
else:
vlen = 0
+ self.log("store oid=%x serial=%x" % (U64(oid), U64(s)))
+
stlen = pack(">I", tlen)
# accumulate various data to write into a list
l = [oid, 'v', stlen, pack(">HI", vlen, len(p)), s]
@@ -674,4 +678,6 @@
% (msg, pos, fileindex))
def log(self, msg, level=zLOG.INFO):
- zLOG.LOG("ZEC:%s" % self._storage, level, msg)
+## zLOG.LOG("ZEC:%s" % self._storage, level, msg)
+ zLOG.LOG("ZEC:%s" % get_ident(), level, msg)
+