Skip to content

Conversation

@ali-ince
Copy link
Contributor

BoltServerAddress was checking equality on Hostname, Resolved IP and Port triplet and DnsResolver was causing loss of original Hostname.

This commit removed public access to resolved IP Address component of BoltServerAddress and removes it from the equality check, thus resulting in same hostname:port pairs equal whatever IP address they are resolved to.

Also removed DnsResolver since it returns a set of addresses (which would not allow same hostname:port pairs resolved to different IP addresses) and offloaded the dns resolution to take place just after custom address resolution (default is identity resolver) happens.

BoltServerAddress was checking equality on  `Hostname`, `Resolved IP` and `Port` triplet and DnsResolver was causing loss of original `Hostname`.

This commit removed public access to resolved IP Address component of BoltServerAddress and removed it from the equality check, thus resulting in same `hostname:port` pairs equal whatever IP address it is resolved to.
@ali-ince ali-ince requested a review from zhenlineo April 18, 2019 13:22
@ali-ince
Copy link
Contributor Author

For the record, we have discussed this PR with @zhenlineo and decided to merge it in.

The only behavioural change visible from outside will be that if the user provides a ServerAddressResolver implementation through configuration, the returned ServerAddresses will go through DNS resolution as well (and that resolution will resolve all IP addresses registered which will be tried in turn until successful). This only applies to initial routing table lookup and fallback to initial routing table when none of the known routers are accessible.

@ali-ince ali-ince merged commit 812db7e into neo4j:1.7 Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant