elasticsearch/elasticsearch — pull request #5548 by bleskes (2014-03-26 13:01:53+00:00)
Title: TransportMasterNodeOperationAction: tighter check for postAdded cluster state change

If a node fails to forward a master node operation to the current master, it will schedule a retry using a listener for cluster state changes. Once the listener is in place (and future changes are guaranteed to be observed) it will double check nothing has change during the addition of the listener. This check has previously been change to use cluster state versions (see: #5499). This is however not reliable solution as master elections (which change the master) do not increment the cluster state version and thus could be missed. This commit changes the check to use reference equality making it stricter.