[Zope-Checkins] CVS: ZODB3/ZODB - Transaction.py:1.39.2.4.4.1 Connection.py:1.76.4.6.4.1

Jeremy Hylton jeremy@zope.com
Thu, 12 Jun 2003 13:49:15 -0400


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv32314/ZODB

Modified Files:
      Tag: jeremy-more-mysteries-branch
	Transaction.py Connection.py 
Log Message:
Add a bunch of logging related to load/store/invalidation.


=== ZODB3/ZODB/Transaction.py 1.39.2.4 => 1.39.2.4.4.1 ===
--- ZODB3/ZODB/Transaction.py:1.39.2.4	Tue Apr 29 17:12:18 2003
+++ ZODB3/ZODB/Transaction.py	Thu Jun 12 13:48:44 2003
@@ -21,6 +21,7 @@
 from string import split, strip, join
 from zLOG import LOG, ERROR, PANIC, INFO, BLATHER, WARNING
 from POSException import ConflictError
+from thread import get_ident
 
 # Flag indicating whether certain errors have occurred.
 hosed=0
@@ -178,6 +179,8 @@
         'Finalize the transaction'
 
         objects = self._objects
+
+        LOG("txn:%s" % get_ident(), 0, "commit %s" % self.description)
 
         subjars = []
         if subtransaction:


=== ZODB3/ZODB/Connection.py 1.76.4.6 => 1.76.4.6.4.1 ===
--- ZODB3/ZODB/Connection.py:1.76.4.6	Mon Jun  9 14:34:06 2003
+++ ZODB3/ZODB/Connection.py	Thu Jun 12 13:48:44 2003
@@ -32,6 +32,9 @@
 from time import time
 from types import StringType, ClassType
 
+from thread import get_ident
+from ZODB.utils import u64
+
 global_code_timestamp = 0
 
 if MUCH_RING_CHECKING:
@@ -496,6 +499,9 @@
         self._inv_lock.acquire()
         try:
             self._invalidated.update(oids)
+            for oid in oids.keys():
+                LOG("ZODB:%s" % get_ident(), 0,
+                    "invalidate oid=%x" % u64(oid))
         finally:
             self._inv_lock.release()
 
@@ -573,6 +579,8 @@
                     # Defer _p_independent() call until state is loaded.
                     return 1
                 else:
+                    LOG("ZODB:%s" % get_ident(), 0,
+                        "read conflit oid=%x" % u64(obj._p_oid))
                     raise ReadConflictError(object=obj)
             else:
                 return 0