You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "jahstreet (via GitHub)" <gi...@apache.org> on 2025/03/06 12:02:57 UTC

Re: [PR] JAVA-3142: Ability to optionally specify remote dcs for deterministic failovers when remote dcs are used in query plan [cassandra-java-driver]

jahstreet commented on code in PR #1896:
URL: https://github.com/apache/cassandra-java-driver/pull/1896#discussion_r1983231999


##########
core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java:
##########
@@ -381,6 +381,8 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
     map.put(TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_MAX_NODES_PER_REMOTE_DC, 0);
     map.put(TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_ALLOW_FOR_LOCAL_CONSISTENCY_LEVELS, false);
     map.put(TypedDriverOption.METRICS_GENERATE_AGGREGABLE_HISTOGRAMS, true);
+    map.put(
+        TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS, ImmutableList.of(""));

Review Comment:
   Hi @nitinitt . Thanks for this contribution, very useful.
   While testing it on my side, I've stumbled upon this default (we use OptionsMap for configuring the driver). With this default, we never go to [`buildRemoteQueryPlanAll`](https://github.com/apache/cassandra-java-driver/pull/1896/files#diff-bbdb6181132c9a28e06a98058d5b3db08d3398ffb4233f242f8da44b26a9249bR333-R334) and fall into `buildRemoteQueryPlanPreferred`, which obviously cannot find nodes of the DC `""`.
   Was this set intentionally to default to a Set with empty string for some reason?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org