Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicast discovery should favour ping response with master over a ping response without master #5413

Conversation

martijnvg
Copy link
Member

For unicast zen discovery don't overwrite a ping response for a node if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

…if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.
@s1monw
Copy link
Contributor

s1monw commented Mar 13, 2014

LGTM

martijnvg added a commit that referenced this pull request Mar 13, 2014
…if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

Closes #5413
martijnvg added a commit that referenced this pull request Mar 13, 2014
…if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

Closes #5413
@martijnvg martijnvg closed this in 669a7ec Mar 13, 2014
martijnvg added a commit that referenced this pull request Mar 13, 2014
…if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

Closes #5413
bleskes added a commit to bleskes/elasticsearch that referenced this pull request Sep 12, 2014
…same node

elastic#5413 introduced a change where we prefer ping responses containing a master over those who don't. The same change changes the preference of acceptance if both pings have a master indication or if neither do.

 elastic#7558 added new flag to the PingResponse which changes after a node has joined the cluster for the very first time. Giving preference to older pings cause the wrong value of this flag to be used.   This commit restores the preference to the original one.
@martijnvg martijnvg deleted the improvements/zen_unicast_maintain_ping_with_master branch May 18, 2015 23:32
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
…if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

Closes elastic#5413
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
…if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

Closes elastic#5413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants