Skip to content
New issue

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

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

Already on GitHub? # to your account

Change how BoltServerAddress equality works #592

Merged
merged 2 commits into from
Apr 18, 2019

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant