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

With unicast discovery, only disconnect from temporary connected nodes #6966

Closed

Conversation

Projects
None yet
4 participants
@kimchy
Copy link
Member

kimchy commented Jul 22, 2014

In unicast discovery, we try to reuse existing discovery nodes based on the node address they have. If we find an existing node based on its address, and for some reason its not connected, don't add it to the list of nodes to disconnect from, as that (full) connection is useful down the road
Also, fixed a rogue count down on a latch in case the ping cycle has ended (in practice, it didn't do any harm, since the latch has timed out already by definition, but still cleaner)

@kimchy kimchy added v1.4.0 labels Jul 22, 2014

@kimchy kimchy added the enhancement label Jul 22, 2014

@martijnvg

View changes

src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java Outdated
@@ -294,7 +299,6 @@ public void run() {
sendPingRequestToNode(sendPingsHandler.id(), timeout, pingRequest, latch, node, nodeToSend);
} else {
// connect took too long, just log it and bail
latch.countDown();

This comment has been minimized.

Copy link
@martijnvg

martijnvg Jul 22, 2014

Member

I think we need the latch.countDown(), because then success variable will be set to true and then we don't do latch.countDown() in the finally block?

This comment has been minimized.

Copy link
@kimchy

kimchy Jul 22, 2014

Author Member

you are correct!, my bad

Unicast discovery: only disconnect from temporary connected nodes
In unicast discovery, we try to reuse existing discovery nodes based on the node address they have. If we find an existing node based on its address, and for some reason its not connected, don't add it to the list of nodes to disconnect from, as that (full) connection is useful down the road
closes #6966
@martijnvg

This comment has been minimized.

Copy link
Member

martijnvg commented Jul 22, 2014

LGTM

@kimchy kimchy closed this in 50ececb Jul 22, 2014

kimchy added a commit that referenced this pull request Jul 22, 2014

Unicast discovery: only disconnect from temporary connected nodes
In unicast discovery, we try to reuse existing discovery nodes based on the node address they have. If we find an existing node based on its address, and for some reason its not connected, don't add it to the list of nodes to disconnect from, as that (full) connection is useful down the road
closes #6966

@kimchy kimchy deleted the kimchy:only_disconnect_from_light_connections branch Jul 22, 2014

@jpountz jpountz removed the review label Jul 24, 2014

@clintongormley clintongormley changed the title Unicast discovery: only disconnect from temporary connected nodes Internal: With unicast discovery, only disconnect from temporary connected nodes Sep 8, 2014

@clintongormley clintongormley changed the title Internal: With unicast discovery, only disconnect from temporary connected nodes With unicast discovery, only disconnect from temporary connected nodes Jun 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.