add logging if failing to execute on a node

This commit is contained in:
kimchy 2011-01-13 16:51:06 +02:00
parent 180d225016
commit ad236d19ee
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@ public abstract class TransportNodesOperationAction<Request extends NodesOperati
private void onFailure(String nodeId, Throwable t) { private void onFailure(String nodeId, Throwable t) {
int idx = index.getAndIncrement(); int idx = index.getAndIncrement();
if (accumulateExceptions()) { if (accumulateExceptions()) {
if (logger.isDebugEnabled()) {
logger.debug("failed to execute on node [{}]", t, nodeId);
}
responses.set(idx, new FailedNodeException(nodeId, "Failed node [" + nodeId + "]", t)); responses.set(idx, new FailedNodeException(nodeId, "Failed node [" + nodeId + "]", t));
} }
if (counter.incrementAndGet() == responses.length()) { if (counter.incrementAndGet() == responses.length()) {