{"push_id":855870715,"size":1,"distinct_size":1,"ref":"refs/heads/transport-broadcast-by-node-action-master-failure","head":"bf823a1f72776842e94248e9db6b1d2f4a0d28ff","before":"6e52c6cae77ae663f24aea9efc47250fc63ebd02","commits":[{"sha":"bf823a1f72776842e94248e9db6b1d2f4a0d28ff","author":{"email":"68c46a606457643eab92053c1c05574abb26f861@tedor.me","name":"Jason Tedor"},"message":"Handle shards assigned to nodes that are not in the cluster state\n\nThis commit addresses an issue in TransportBroadcastByNodeAction.\nNamely, if in between a master leaving the cluster and a new one being\nassigned, a request that relies on TransportBroadcastByNodeAction\n(e.g., an indices stats request) is issued,\nTransportBroadcastByNodeAction might attempt to send a request to a\nnode that is no longer in the local node’s cluster state.\n\nThe exact circumstances that lead to this are as follows. When the\nmaster leaves the cluster and another node’s master fault detection\ndetects this, the local node will update its local cluster state to no\nlonger include the master node. However, the routing table will not be\nupdated. This means that in the preparation for sending the requests in\nTransportBroadcastByNodeAction, we need to check that not only is a\nshard assigned, but also that it is assigned to a node that is still in\nthe local node’s cluster state.\n\nThis commit adds such a check to the constructor of\nTransportBroadcastByNodeAction. A new unit test is added that checks\nthat no request is sent to the master node in such a situation; this\ntest fails with a NullPointerException without the fix. Additionally,\nthe unit test TransportBroadcastByNodeActionTests#testResultAggregation\nis updated to also simulate a master failure. This updated test also\nfails prior to the fix.\n\nCloses #14584","distinct":true,"url":"https://api.github.com/repos/jasontedor/elasticsearch/commits/bf823a1f72776842e94248e9db6b1d2f4a0d28ff"}]}