You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ty...@apache.org on 2014/08/01 17:36:16 UTC

git commit: Fix min/max cell name collection with 2.0 range tombstones

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 18ce8c72a -> c46477b8e


Fix min/max cell name collection with 2.0 range tombstones

Patch by Tyler Hobbs; review by Marcus Eriksson for CASSANDRA-7593


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

Branch: refs/heads/cassandra-2.1.0
Commit: c46477b8e3dd74306ebe588801167d0e45ae4556
Parents: 18ce8c7
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Fri Aug 1 10:35:28 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Fri Aug 1 10:35:28 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                    | 2 ++
 src/java/org/apache/cassandra/io/sstable/ColumnNameHelper.java | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c46477b8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7823f87..c2ae6dc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.0-final
+ * Fix min/max cell name collection on 2.0 SSTables with range
+   tombstones (CASSANDRA-7593)
  * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
  * Filter cached results correctly (CASSANDRA-7636)
  * Fix tracing on the new SEPExecutor (CASSANDRA-7644)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c46477b8/src/java/org/apache/cassandra/io/sstable/ColumnNameHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/ColumnNameHelper.java b/src/java/org/apache/cassandra/io/sstable/ColumnNameHelper.java
index d390518..f74b86f 100644
--- a/src/java/org/apache/cassandra/io/sstable/ColumnNameHelper.java
+++ b/src/java/org/apache/cassandra/io/sstable/ColumnNameHelper.java
@@ -64,7 +64,7 @@ public class ColumnNameHelper
     {
         // For a cell name, no reason to look more than the clustering prefix
         // (and comparing the collection element would actually crash)
-        int size = candidate instanceof CellName ? ((CellName)candidate).clusteringSize() : candidate.size();
+        int size = Math.min(candidate.size(), comparator.clusteringPrefixSize());
 
         if (maxSeen.isEmpty())
             return getComponents(candidate, size);
@@ -92,7 +92,7 @@ public class ColumnNameHelper
     {
         // For a cell name, no reason to look more than the clustering prefix
         // (and comparing the collection element would actually crash)
-        int size = candidate instanceof CellName ? ((CellName)candidate).clusteringSize() : candidate.size();
+        int size = Math.min(candidate.size(), comparator.clusteringPrefixSize());
 
         if (minSeen.isEmpty())
             return getComponents(candidate, size);