fix: 4.x can't connect to the cluster when first node is non responsive#357
Open
dkropachev wants to merge 2 commits intoscylla-4.xfrom
Open
Conversation
7905ae0 to
23ce185
Compare
79f95ee to
e0cfb07
Compare
e7155f9 to
b6edf18
Compare
Bouncheck
reviewed
Oct 9, 2024
There was a problem hiding this comment.
Test seems to be working and resolving the issue. Current version replaces the unresolved InetSocketAddress with DefaultEndPoints with resolved addresses - this is not in line with current description of "advanced.resolve-contact-points" option.
I am not sure if modifying EndPoint interface which is a part of public API is a good idea or necessary.
core/src/main/java/com/datastax/oss/driver/api/core/metadata/EndPoint.java
Show resolved
Hide resolved
core/src/main/java/com/datastax/oss/driver/internal/core/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
integration-tests/src/test/java/com/datastax/oss/driver/core/resolver/MockResolverIT.java
Outdated
Show resolved
Hide resolved
d3b7fb7 to
9ac58ad
Compare
netty bootstrap.connect uses only first address of unresolved InetSocketAddress. That causes 4.x to not even try to connect to other when it first one fails. This PR makes driver to resolve unresolved endpoint, instead of leaving to to netty. Making it possible to connect to any ip address from DNS contact endpoint.
9ac58ad to
0dfd84c
Compare
0666b08 to
de10f2f
Compare
1979ab1 to
a4e60af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #356
Since netty
bootstrap.connectuses only first address of unresolved InetSocketAddress 4.x does not even try to connect to other when it fails.This PR makes driver resolve unresolved endpoint itself and only then handing it over
bootstrap.connect