scylladb / java-driver

ScyllaDB Java Driver for ScyllaDB and Apache Cassandra, based on the DataStax Java Driver
Apache License 2.0
63 stars 37 forks source link

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

Open mykaul opened 1 year ago

mykaul commented 1 year ago

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 commented 6 months ago

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

mykaul commented 3 months ago

@roydahan @dkropachev ping. This needs some attention.

dkropachev commented 3 months ago

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.

mykaul commented 3 months ago

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 <omichallat+github@gmail.com>
Date:   Mon Sep 24 15:38:30 2018 -0700

    JAVA-1978: Add a config option to keep contact points unresolved
dkropachev commented 3 months ago

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 <omichallat+github@gmail.com>
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 commented 3 months ago

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.

Bouncheck commented 3 months ago

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.