[Zodb-checkins] CVS: ZODB3/ZEO - StorageServer.py:1.98.4.3

Jeremy Hylton jeremy at zope.com
Fri Sep 19 15:19:00 EDT 2003


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv27707/ZEO

Modified Files:
      Tag: Zope-2_7-branch
	StorageServer.py 
Log Message:
Experimental logging for conflicts and conflict resolution.


=== ZODB3/ZEO/StorageServer.py 1.98.4.2 => 1.98.4.3 ===
--- ZODB3/ZEO/StorageServer.py:1.98.4.2	Mon Sep 15 17:26:53 2003
+++ ZODB3/ZEO/StorageServer.py	Fri Sep 19 15:18:59 2003
@@ -43,7 +43,7 @@
 from ZODB.POSException import TransactionError, ReadOnlyError, ConflictError
 from ZODB.referencesf import referencesf
 from ZODB.Transaction import Transaction
-from ZODB.utils import u64
+from ZODB.utils import u64, oid_repr
 
 _label = "ZSS" # Default label used for logging.
 
@@ -483,6 +483,8 @@
             self.store_failed = 1
             if isinstance(err, ConflictError):
                 self.stats.conflicts += 1
+                self.log("conflict error oid=%s msg=%s" %
+                         (oid_repr(oid), str(err)), zLOG.BLATHER)
             if not isinstance(err, TransactionError):
                 # Unexpected errors are logged and passed to the client
                 exc_info = sys.exc_info()
@@ -506,6 +508,7 @@
                 self.invalidated.append((oid, version))
         if newserial == ResolvedSerial:
             self.stats.conflicts_resolved += 1
+            self.log("conflict resolved oid=%s" % oid_repr(oid), zLOG.BLATHER)
         self.serials.append((oid, newserial))
         return err is None
 




More information about the Zodb-checkins mailing list