java-driver icon indicating copy to clipboard operation
java-driver copied to clipboard

Driver tries to reconnect to a contact point based on its resolved IP, not its original DNS name.

Open mykaul opened this issue 2 years ago • 7 comments

See https://datastax-oss.atlassian.net/browse/JAVA-1522#icft=JAVA-1522 (and filed https://github.com/scylladb/gocql/issues/118 on our gocql driver).

Might be fixed with https://datastax-oss.atlassian.net/browse/JAVA-1978 (was it resolved in https://github.com/datastax/java-driver/commit/1134c709f64a0d15664713f375e5d0d3850c4522 ?)

mykaul avatar May 04 '23 13:05 mykaul

@roydahan , @avelanarius - what's going on with this item?

mykaul avatar May 15 '24 05:05 mykaul

@roydahan @dkropachev ping. This needs some attention.

mykaul avatar Aug 26 '24 15:08 mykaul

As @mykaul suggested it is indeed resolved by https://github.com/apache/cassandra-java-driver/commit/1134c709f64a0d15664713f375e5d0d3850c4522, which have ended up in 4.18.1. Let's sync with upstream to get it in.

dkropachev avatar Aug 26 '24 17:08 dkropachev

As @mykaul suggested it is indeed resolved by apache@1134c70, which have ended up in 4.18.1. Let's sync with upstream to get it in.

I see it in already ages ago:

commit 1134c709f64a0d15664713f375e5d0d3850c4522
Author: olim7t <[email protected]>
Date:   Mon Sep 24 15:38:30 2018 -0700

    JAVA-1978: Add a config option to keep contact points unresolved

mykaul avatar Aug 27 '24 07:08 mykaul

As @mykaul suggested it is indeed resolved by apache@1134c70, which have ended up in 4.18.1. Let's sync with upstream to get it in.

I see it in already ages ago:

commit 1134c709f64a0d15664713f375e5d0d3850c4522
Author: olim7t <[email protected]>
Date:   Mon Sep 24 15:38:30 2018 -0700

    JAVA-1978: Add a config option to keep contact points unresolved

I have made mistake, it is in the driver since 4.10.0, I will take a closer look at https://github.com/scylladb/scylla-enterprise/issues/2915, if this scenario is being tested.

dkropachev avatar Aug 27 '24 13:08 dkropachev

After https://github.com/scylladb/java-driver/pull/332 we finally have infrastructure to test DNS cases.

@Bouncheck , could you please make a test for scenario when cluster of three nodes that is targeted by driver as single DNS record (with RESOLVE_CONTACT_POINTS=false) is getting completely replaced making sure that sessions that created at the begging of the test remain operational all the way through the test and at the end of the test.

dkropachev avatar Aug 31 '24 12:08 dkropachev

After #332 we finally have infrastructure to test DNS cases.

@Bouncheck , could you please make a test for scenario when cluster of three nodes that is targeted by driver as single DNS record (with RESOLVE_CONTACT_POINTS=false) is getting completely replaced making sure that sessions that created at the begging of the test remain operational all the way through the test and at the end of the test.

Created #335 . Marked as draft because it fails with less than 3% chance (not accurate measurement). Fails due to occasionally replacing unresolved contact point with resolved address.

Bouncheck avatar Sep 02 '24 12:09 Bouncheck