Skip to content

Conversation

lutovich
Copy link
Contributor

Internally driver always uses BoltServerAddress to represent host and port. These addresses are constructed from the initial driver URI and from routing procedure output in routing driver. Bolt address is only resolved to an InetAddress when new connection is established.

Resolved InetSocketAddress was cached in BoltServerAddress which caused problems when corresponding DNS record changed. Driver would then still try to connect to a cached stale InetSocketAddress.

This PR makes resolution happen on every connection.

Internally driver always uses `BoltServerAddress` to represent host
and port. These addresses are constructed from the initial driver
URI and from routing procedure output in routing driver. Bolt address
is only resolved to an `InetAddress` when new connection is established.

Resolved `InetSocketAddress` was cached in `BoltServerAddress` which
caused problems when corresponding DNS record changed. Driver would
then still try to connect to a cached stale `InetSocketAddress`.

This commit makes resolution happen on every connection.
@zhenlineo
Copy link
Contributor

shall we fix it in 1.3/1.2?

@lutovich
Copy link
Contributor Author

@zhenlineo I thought about fixing this only in 1.4 and doing 1.4.1 release to avoid touching previous branches.

@zhenlineo zhenlineo merged commit 1325ff8 into neo4j:1.4 Jun 22, 2017
@lutovich lutovich deleted the 1.4-bolt-address-resolution branch June 22, 2017 11:38
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.

2 participants