|
24 | 24 | import org.apache.lucene.util.SetOnce;
|
25 | 25 | import org.elasticsearch.action.ActionListener;
|
26 | 26 | import org.elasticsearch.cluster.ClusterName;
|
| 27 | +import org.elasticsearch.cluster.ClusterState; |
27 | 28 | import org.elasticsearch.cluster.coordination.Coordinator;
|
28 | 29 | import org.elasticsearch.cluster.coordination.PeersResponse;
|
29 | 30 | import org.elasticsearch.cluster.node.DiscoveryNode;
|
@@ -448,7 +449,8 @@ public String executor() {
|
448 | 449 | if (Coordinator.isZen1Node(discoveryNode)) {
|
449 | 450 | actionName = UnicastZenPing.ACTION_NAME;
|
450 | 451 | transportRequest = new UnicastZenPing.UnicastPingRequest(1, ZenDiscovery.PING_TIMEOUT_SETTING.get(settings),
|
451 |
| - new ZenPing.PingResponse(getLocalNode(), null, ClusterName.CLUSTER_NAME_SETTING.get(settings), 0L)); |
| 452 | + new ZenPing.PingResponse(getLocalNode(), null, ClusterName.CLUSTER_NAME_SETTING.get(settings), |
| 453 | + ClusterState.UNKNOWN_VERSION)); |
452 | 454 | transportResponseHandler = peersResponseHandler.wrap(ucResponse -> {
|
453 | 455 | Optional<DiscoveryNode> optionalMasterNode = Arrays.stream(ucResponse.pingResponses)
|
454 | 456 | .filter(pr -> discoveryNode.equals(pr.node()) && discoveryNode.equals(pr.master()))
|
@@ -493,7 +495,8 @@ public void messageReceived(UnicastZenPing.UnicastPingRequest request, Transport
|
493 | 495 | final ClusterName clusterName = ClusterName.CLUSTER_NAME_SETTING.get(settings);
|
494 | 496 | pingResponses.add(new ZenPing.PingResponse(transportService.getLocalNode(), peersResponse.getMasterNode().orElse(null),
|
495 | 497 | clusterName, 0L));
|
496 |
| - peersResponse.getKnownPeers().forEach(dn -> pingResponses.add(new ZenPing.PingResponse(dn, null, clusterName, 0L))); |
| 498 | + peersResponse.getKnownPeers().forEach(dn -> pingResponses.add( |
| 499 | + new ZenPing.PingResponse(dn, null, clusterName, ClusterState.UNKNOWN_VERSION))); |
497 | 500 | channel.sendResponse(new UnicastZenPing.UnicastPingResponse(request.id, pingResponses.toArray(new ZenPing.PingResponse[0])));
|
498 | 501 | }
|
499 | 502 | }
|
|
0 commit comments