[ 
https://issues.apache.org/jira/browse/CASSANDRA-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212343#comment-17212343
 ] 

Andres de la Peña edited comment on CASSANDRA-14361 at 10/12/20, 12:55 PM:
---------------------------------------------------------------------------

[~benbromhead] changes look mostly good, but I'm getting a 
{{NullPointerPointerException}} during startup that doesn't even allow to start 
the server. That happens because of my suggestion of using {{getPortOrDefault}} 
in 
[{{InetAddressAndPort.getAllByNameOverrideDefaults}}|https://github.com/apache/cassandra/blob/f9de59c5856fc3fee1aaf1f9c09aa63cf39b10ee/src/java/org/apache/cassandra/locator/InetAddressAndPort.java#L234].
 This is because {{HostAndPort#getPortOrDefault}} expects an {{int}} argument 
and it's receiving a {{null}} instead, so we should either keep using it and 
pass {{InetAddressAndPort.defaultPort}} to it, or leave it as it was.

Additionally, I still think it would be nice to place the threshold property in 
{{cassandra.yaml}}. Note that there is [a new section for safety thresholds at 
{{cassandra.yaml}}|https://github.com/apache/cassandra/blob/trunk/conf/cassandra.yaml#L1217-L1273],
 that would be the place to put it. That way we would give visibility and some 
documentation to the new property, so users know that it exists and how to use 
it.


was (Author: adelapena):
[~benbromhead] changes look mostly good, but I'm getting a 
{{NullPointerPointerException}} during startup that doesn't even allow to start 
the server. That happens because of my suggestion of using {{getPortOrDefault}} 
in 
[{{InetAddressAndPort.getAllByNameOverrideDefaults}}|https://github.com/apache/cassandra/blob/f9de59c5856fc3fee1aaf1f9c09aa63cf39b10ee/src/java/org/apache/cassandra/locator/InetAddressAndPort.java#L234].
 This is because {{HostAndPort#getPortOrDefault}} expects an {{int}} argument 
and it's receiving a {{null}} instead, so we should either keep using it and 
pass {{InetAddressAndPort.defaultPort}} to it, or leave it as it was.

Additionally, I still think it would be nice to place the threshold property in 
{{cassandra.yaml}}. Note that there is [a new section for safety thresholds at 
{{cassandra.yaml}}|https://github.com/apache/cassandra/blob/trunk/conf/cassandra.yaml#L1217-L1273],
 that would be the place to put it.

> Allow SimpleSeedProvider to resolve multiple IPs per DNS name
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-14361
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14361
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Config
>            Reporter: Ben Bromhead
>            Assignee: Ben Bromhead
>            Priority: Low
>             Fix For: 4.0.x
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently SimpleSeedProvider can accept a comma separated string of IPs or 
> hostnames as the set of Cassandra seeds. hostnames are resolved via 
> InetAddress.getByName, which will only return the first IP associated with an 
> A, AAAA or CNAME record.
> By changing to InetAddress.getAllByName, existing behavior is preserved, but 
> now Cassandra can discover multiple IP address per record, allowing seed 
> discovery by DNS to be a little easier.
> Some examples of improved workflows with this change include: 
>  * specify the DNS name of a headless service in Kubernetes which will 
> resolve to all IP addresses of pods within that service. 
>  * seed discovery for multi-region clusters via AWS route53, AzureDNS etc
>  * Other common DNS service discovery mechanisms.
> The only behavior this is likely to impact would be where users are relying 
> on the fact that getByName only returns a single IP address.
> I can't imagine any scenario where that is a sane choice. Even when that 
> choice has been made, it only impacts the first startup of Cassandra and 
> would not be on any critical path.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to