cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [1/4] git commit: Always merge ranges owned by a single node in DES
Date Thu, 24 Jul 2014 22:44:13 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 6d6ea5b81 -> 2f3f68366


Always merge ranges owned by a single node in DES

Patch by Ala' Alkhaldi; review by Tyler Hobbs for CASSANDRA-6930


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

Branch: refs/heads/trunk
Commit: 67ce78fcc70422b7d831f6fc4a6e5512ca4d5ffa
Parents: 1e2a5b0
Author: Tyler Hobbs <tyler@datastax.com>
Authored: Thu Jul 24 17:38:26 2014 -0500
Committer: Tyler Hobbs <tyler@datastax.com>
Committed: Thu Jul 24 17:38:26 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/67ce78fc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6f67720..7819ccb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Always merge ranges owned by a single node (CASSANDRA-6930)
  * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
  * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
  * (Windows) force range-based repair to non-sequential mode (CASSANDRA-7541)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/67ce78fc/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
index 32f52ee..49442c8 100644
--- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
+++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
@@ -318,6 +318,10 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements
ILa
         if (!subsnitch.isWorthMergingForRangeQuery(merged, l1, l2))
             return false;
 
+        // skip checking scores in the single-node case
+        if (l1.size() == 1 && l2.size() == 1 && l1.get(0).equals(l2.get(0)))
+            return true;
+
         // Make sure we return the subsnitch decision (i.e true if we're here) if we lack
too much scores
         double maxMerged = maxScore(merged);
         double maxL1 = maxScore(l1);


Mime
View raw message