-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Transport: Remove parsing of port ranges #7561
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
Transport: Remove parsing of port ranges #7561
Conversation
@@ -62,8 +62,6 @@ | |||
|
|||
public static final String ACTION_NAME = "internal:discovery/zen/unicast"; | |||
|
|||
public static final int LIMIT_PORTS_COUNT = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked with @kimchy a while ago about increasing LIMIT_PORTS_COUNT to 2.
See thread here: elastic/elasticsearch-cloud-aws#99 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the related issue here: #7090
I'm -1 for this change because of the following:
Or it means that discovery plugins need to add more than one node in the unicast list of nodes. WDYT? |
it does not matter, if the max setting is |
@spinscale That's indeed what I suggested here: elastic/elasticsearch-cloud-aws#99 (comment)
But @kimchy preferred to manage that in elasticsearch core code not in plugins if I understood correctly. |
public TransportAddress addressFromString(String address) throws Exception { | ||
int index = address.lastIndexOf(':'); | ||
if (index == -1) { | ||
return new InetSocketTransportAddress(address, Integer.parseInt(this.port)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not work, right? cause the default is 9300-9400
, which is good, since we want to try another port on the second instance we start on the same machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused here. This is not about binding to a port when starting, only about connecting to other nodes, as far as I can judge the source codes. Starting up several nodes in parallel on one machines still works as expected
UnicastZenDiscovery allowed you to specify port ranges for hosts to connect to. However only the first port was used at all, when specifying something like `host[9300-9400]`. This commit only accepts `host:port` pairs and thus makes the configuration reflect the execution as even in the old setup only a single host:port pair was pinged at all, as this was very expensive.
05663b3
to
5e8cf52
Compare
@spinscale what's happening with this one? |
@clintongormley waiting for feedback here on my comments, cc @kimchy |
closing this for now, not an issue anymore in tests and does not seem to be a problem for anyone else. |
UnicastZenDiscovery allowed you to specify port ranges for hosts to connect to.
However only the first port was used at all, when specifying something like
host[9300-9400]
. This commit only acceptshost:port
pairs and thus makesthe configuration reflect the execution as even in the old setup only a single
host:port pair was pinged at all, as this was very expensive.
Note there is a coming PR for 1.x, which deprecates this setting and emits a warning instead of removing it.