Commit 4a1281b7 authored by Aurel's avatar Aurel

build another set to know the list of nodes to which we have sent LOCk

messages, otherwise we can wait infinitely for nodes which are no longer running


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@571 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b9cea76b
...@@ -94,6 +94,7 @@ class ServiceEventHandler(MasterEventHandler): ...@@ -94,6 +94,7 @@ class ServiceEventHandler(MasterEventHandler):
if not app.pt.operational(): if not app.pt.operational():
# Catastrophic. # Catastrophic.
raise OperationFailure, 'cannot continue operation' raise OperationFailure, 'cannot continue operation'
def connectionClosed(self, conn): def connectionClosed(self, conn):
self._dealWithNodeFailure(conn, TEMPORARILY_DOWN_STATE) self._dealWithNodeFailure(conn, TEMPORARILY_DOWN_STATE)
...@@ -422,14 +423,18 @@ class ServiceEventHandler(MasterEventHandler): ...@@ -422,14 +423,18 @@ class ServiceEventHandler(MasterEventHandler):
uuid_set.update((cell.getUUID() for cell in app.pt.getCellList(part))) uuid_set.update((cell.getUUID() for cell in app.pt.getCellList(part)))
# Request locking data. # Request locking data.
# build a new set as we may not send the message to all nodes as some
# might be not reachable at that time
used_uuid_set = set()
for c in app.em.getConnectionList(): for c in app.em.getConnectionList():
if c.getUUID() in uuid_set: if c.getUUID() in uuid_set:
c.ask(protocol.lockInformation(tid), timeout=60) c.ask(protocol.lockInformation(tid), timeout=60)
used_uuid_set.add(c.getUUID())
try: try:
t = app.finishing_transaction_dict[tid] t = app.finishing_transaction_dict[tid]
t.setOIDList(oid_list) t.setOIDList(oid_list)
t.setUUIDSet(uuid_set) t.setUUIDSet(used_uuid_set)
t.setMessageId(packet.getId()) t.setMessageId(packet.getId())
except KeyError: except KeyError:
logging.warn('finishing transaction %s does not exist', dump(tid)) logging.warn('finishing transaction %s does not exist', dump(tid))
......
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