cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] cassandra git commit: Make sure EACH_QUORUM reads are using NTS
Date Thu, 05 Nov 2015 23:22:49 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk bc674c1c8 -> d128103b3


Make sure EACH_QUORUM reads are using NTS

patch by Carl Yeksigian; reviewed by Ariel Weisberg for CASSANDRA-10584


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f3eb4ce4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f3eb4ce4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f3eb4ce4

Branch: refs/heads/trunk
Commit: f3eb4ce40b3a57768c6368546ed0ca16d8634f54
Parents: 1bd2c94
Author: Carl Yeksigian <carl@apache.org>
Authored: Mon Oct 26 12:02:01 2015 -0400
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Thu Nov 5 23:16:33 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt                                            | 1 +
 src/java/org/apache/cassandra/db/ConsistencyLevel.java | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3eb4ce4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ce24c2b..1dd1ed2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Make sure EACH_QUORUM reads are using NTS (CASSANDRA-10584)
  * Fix MV replica filtering for non-NetworkTopologyStrategy (CASSANDRA-10634)
  * (Hadoop) fix CIF describeSplits() not handling 0 size estimates (CASSANDRA-10600)
  * Fix reading of legacy sstables (CASSANDRA-10590)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3eb4ce4/src/java/org/apache/cassandra/db/ConsistencyLevel.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ConsistencyLevel.java b/src/java/org/apache/cassandra/db/ConsistencyLevel.java
index c6655dc..ab4243f 100644
--- a/src/java/org/apache/cassandra/db/ConsistencyLevel.java
+++ b/src/java/org/apache/cassandra/db/ConsistencyLevel.java
@@ -182,9 +182,12 @@ public enum ConsistencyLevel
 
     public List<InetAddress> filterForQuery(Keyspace keyspace, List<InetAddress>
liveEndpoints, ReadRepairDecision readRepair)
     {
-        // If we are doing an each quorum, we have to make sure that the endpoints we select
provide a quorum for each
-        // data center
-        if (this == EACH_QUORUM)
+        /*
+         * If we are doing an each quorum query, we have to make sure that the endpoints
we select
+         * provide a quorum for each data center. If we are not using a NetworkTopologyStrategy,
+         * we should fall through and grab a quorum in the replication strategy.
+         */
+        if (this == EACH_QUORUM && keyspace.getReplicationStrategy() instanceof NetworkTopologyStrategy)
             return filterForEachQuorum(keyspace, liveEndpoints, readRepair);
 
         /*


Mime
View raw message