[Neo-report] r2164 vincent - /trunk/neo/client/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jun 15 12:04:43 CEST 2010


Author: vincent
Date: Tue Jun 15 12:04:42 2010
New Revision: 2164

Log:
Swallow more exceptions in tpc_abort.

ConnectorConnectionClosedException might get triggered when notifying a
node about transaction abortion, causing tpc_abort to fail eating pending
answers and clearing local_var.
Swallow all exceptions (various network problems translating to various
exceptions).

Modified:
    trunk/neo/client/app.py

Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Tue Jun 15 12:04:42 2010
@@ -782,11 +782,19 @@ class Application(object):
             conn = getConnForNode(node)
             if conn is None:
                 continue
-            conn.notify(p)
+            try:
+                conn.notify(p)
+            except:
+                logging.error('Exception in tpc_abort while notifying ' \
+                    'storage node %r of abortion, ignoring.', conn, exc_info=1)
 
         # Abort the transaction in the primary master node.
         conn = self._getMasterConnection()
-        conn.notify(p)
+        try:
+            conn.notify(p)
+        except:
+            logging.error('Exception in tpc_abort while notifying master ' \
+                'node %r of abortion, ignoring.', conn, exc_info=1)
 
         # Just wait for responses to arrive. If any leads to an exception,
         # log it and continue: we *must* eat all answers to not disturb the
@@ -798,7 +806,8 @@ class Application(object):
             try:
                 _waitAnyMessage()
             except:
-                logging.error('Exception in tpc_abort', exc_info=1)
+                logging.error('Exception in tpc_abort while handling ' \
+                    'pending answers, ignoring.', exc_info=1)
 
         self.local_var.clear()
 





More information about the Neo-report mailing list