A failure during the response construction could cause a Node Operation never to return

This commit is contained in:
Boaz Leskes 2013-12-13 09:18:47 +01:00
parent a4814c2f69
commit b65d07b495
1 changed files with 9 additions and 1 deletions

View File

@ -214,7 +214,15 @@ public abstract class TransportNodesOperationAction<Request extends NodesOperati
} }
private void finishHim() { private void finishHim() {
listener.onResponse(newResponse(request, responses)); Response finalResponse;
try {
finalResponse = newResponse(request, responses);
} catch (Throwable t) {
logger.debug("failed to combine responses from nodes", t);
listener.onFailure(t);
return;
}
listener.onResponse(finalResponse);
} }
} }