Madan Jampani

Broadcast shouldn't give up before attempting to unicast to every memeber

...@@ -103,7 +103,7 @@ public class ClusterCommunicationManager ...@@ -103,7 +103,7 @@ public class ClusterCommunicationManager
103 final ControllerNode localNode = clusterService.getLocalNode(); 103 final ControllerNode localNode = clusterService.getLocalNode();
104 for (NodeId nodeId : nodes) { 104 for (NodeId nodeId : nodes) {
105 if (!nodeId.equals(localNode.id())) { 105 if (!nodeId.equals(localNode.id())) {
106 - ok = unicast(message, nodeId) && ok; 106 + ok = unicastUnchecked(message, nodeId) && ok;
107 } 107 }
108 } 108 }
109 return ok; 109 return ok;
...@@ -124,6 +124,14 @@ public class ClusterCommunicationManager ...@@ -124,6 +124,14 @@ public class ClusterCommunicationManager
124 } 124 }
125 } 125 }
126 126
127 + private boolean unicastUnchecked(ClusterMessage message, NodeId toNodeId) throws IOException {
128 + try {
129 + return unicast(message, toNodeId);
130 + } catch (IOException e) {
131 + return false;
132 + }
133 + }
134 +
127 @Override 135 @Override
128 public ClusterMessageResponse sendAndReceive(ClusterMessage message, NodeId toNodeId) throws IOException { 136 public ClusterMessageResponse sendAndReceive(ClusterMessage message, NodeId toNodeId) throws IOException {
129 ControllerNode node = clusterService.getNode(toNodeId); 137 ControllerNode node = clusterService.getNode(toNodeId);
......