Elffuss BraidHub

kikocis/java-driver public

JAVA-1009: use CL ONE to compute query plan when reconnecting control connection.

Before this change, it used the default CL which is a local one
(currently LOCAL_QUORUM, soon to be changed to LOCAL_ONE).

If the driver is configured to use DCAwareRoundRobinPolicy with
usedHostsPerRemoteDc > 0 but !allowRemoteDCsForLocalConsistencyLevel,
this would cause remote nodes to be excluded from the query plan.  If
the user specified usedHostsPerRemoteDc > 0 they probably expect that
remote hosts should be picked for the control connection regardless of
their default CL, hence the change.
Changesete75c6c2093c01574d8ff8f481da2617d96e288d59a695e6dc454533a049291d5
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2015-12-02 15:32 -06:00
Committerolim7t <omichallat+github@gmail.com> · 2015-12-03 18:06 +01:00
Parentsb26a5ad6850e

Browse the files at this changeset

2 files changed

modified changelog/README.md +2 −0
@@ -5,6 +5,8 @@
55 - [bug] JAVA-993: Support for "custom" types after CASSANDRA-10365.
66 - [bug] JAVA-999: Handle unset parameters in QueryLogger.
77 - [bug] JAVA-998: SchemaChangeListener not invoked for Functions or Aggregates having UDT arguments.
8+- [bug] JAVA-1009: use CL ONE to compute query plan when reconnecting
9+ control connection.
810
911 Merged from 2.1 branch:
1012
modified driver-core/src/main/java/com/datastax/driver/core/Statement.java +5 −0
@@ -51,6 +51,11 @@
5151 public String getKeyspace() {
5252 return null;
5353 }
54+
55+ @Override
56+ public ConsistencyLevel getConsistencyLevel() {
57+ return ConsistencyLevel.ONE;
58+ }
5459 };
5560
5661 private volatile ConsistencyLevel consistency;