[Zodb-checkins] SVN: ZODB/trunk/src/ Bugs Fixed
Jim Fulton
jim at zope.com
Mon Apr 11 17:06:15 EDT 2011
Log message for revision 121390:
Bugs Fixed
----------
- ZEO server transaction timeouts weren't logged as critical.
https://bugs.launchpad.net/zodb/+bug/670986
Changed:
U ZODB/trunk/src/CHANGES.txt
U ZODB/trunk/src/ZEO/StorageServer.py
U ZODB/trunk/src/ZEO/tests/ConnectionTests.py
-=-
Modified: ZODB/trunk/src/CHANGES.txt
===================================================================
--- ZODB/trunk/src/CHANGES.txt 2011-04-11 21:01:44 UTC (rev 121389)
+++ ZODB/trunk/src/CHANGES.txt 2011-04-11 21:06:15 UTC (rev 121390)
@@ -30,6 +30,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/trunk/src/ZEO/StorageServer.py
===================================================================
--- ZODB/trunk/src/ZEO/StorageServer.py 2011-04-11 21:01:44 UTC (rev 121389)
+++ ZODB/trunk/src/ZEO/StorageServer.py 2011-04-11 21:06:15 UTC (rev 121390)
@@ -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/trunk/src/ZEO/tests/ConnectionTests.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/ConnectionTests.py 2011-04-11 21:01:44 UTC (rev 121389)
+++ ZODB/trunk/src/ZEO/tests/ConnectionTests.py 2011-04-11 21:06:15 UTC (rev 121390)
@@ -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