Commit 5e305f7a authored by Vincent Pelletier's avatar Vincent Pelletier

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).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2164 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 40351191
...@@ -782,11 +782,19 @@ class Application(object): ...@@ -782,11 +782,19 @@ class Application(object):
conn = getConnForNode(node) conn = getConnForNode(node)
if conn is None: if conn is None:
continue 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. # Abort the transaction in the primary master node.
conn = self._getMasterConnection() 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, # 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 # log it and continue: we *must* eat all answers to not disturb the
...@@ -798,7 +806,8 @@ class Application(object): ...@@ -798,7 +806,8 @@ class Application(object):
try: try:
_waitAnyMessage() _waitAnyMessage()
except: 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() self.local_var.clear()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment