[Zodb-checkins] SVN: ZODB/branches/3.10/src/ Bugs Fixed

Jim Fulton jim at zope.com
Fri Feb 11 18:18:22 EST 2011


Log message for revision 120290:
  Bugs Fixed
  ----------
  
  - ZEO server transaction timeouts weren't logged as critical.
  
  https://bugs.launchpad.net/zodb/+bug/670986
  

Changed:
  U   ZODB/branches/3.10/src/CHANGES.txt
  U   ZODB/branches/3.10/src/ZEO/StorageServer.py
  U   ZODB/branches/3.10/src/ZEO/tests/ConnectionTests.py

-=-
Modified: ZODB/branches/3.10/src/CHANGES.txt
===================================================================
--- ZODB/branches/3.10/src/CHANGES.txt	2011-02-11 21:35:03 UTC (rev 120289)
+++ ZODB/branches/3.10/src/CHANGES.txt	2011-02-11 23:18:22 UTC (rev 120290)
@@ -18,6 +18,10 @@
 
   See (for example): https://bugs.launchpad.net/zodb/+bug/665452
 
+- ZEO server transaction timeouts weren't logged as critical.
+
+  https://bugs.launchpad.net/zodb/+bug/670986
+
 3.10.1 (2010-10-27)
 ===================
 

Modified: ZODB/branches/3.10/src/ZEO/StorageServer.py
===================================================================
--- ZODB/branches/3.10/src/ZEO/StorageServer.py	2011-02-11 21:35:03 UTC (rev 120289)
+++ ZODB/branches/3.10/src/ZEO/StorageServer.py	2011-02-11 23:18:22 UTC (rev 120290)
@@ -1337,7 +1337,7 @@
 
             if howlong <= 0:
                 client.log("Transaction timeout after %s seconds" %
-                           self._timeout, logging.ERROR)
+                           self._timeout, logging.CRITICAL)
                 try:
                     client.connection.call_from_thread(client.connection.close)
                 except:

Modified: ZODB/branches/3.10/src/ZEO/tests/ConnectionTests.py
===================================================================
--- ZODB/branches/3.10/src/ZEO/tests/ConnectionTests.py	2011-02-11 21:35:03 UTC (rev 120289)
+++ ZODB/branches/3.10/src/ZEO/tests/ConnectionTests.py	2011-02-11 23:18:22 UTC (rev 120290)
@@ -994,6 +994,16 @@
         storage.tpc_vote(txn)
         time.sleep(2)
         self.assertRaises(ClientDisconnected, storage.tpc_finish, txn)
+
+        # Make sure it's logged as CRITICAL
+        for line in open("server-%s.log" % self.addr[0][1]):
+            if (('Transaction timeout after' in line) and
+                ('CRITICAL ZEO.StorageServer' in line)
+                ):
+                break
+        else:
+            self.assert_(False, 'bad logging')
+
         storage.close()
 
     def checkTimeoutOnAbort(self):



More information about the Zodb-checkins mailing list