cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [4/4] git commit: Use CF comparator to sort indexed columns in SecondaryIndexManager
Date Mon, 25 Jun 2012 17:38:56 GMT
Use CF comparator to sort indexed columns in SecondaryIndexManager

patch by slebresne; reviewed by jbellis for CASSANDRA-4365


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

Branch: refs/heads/trunk
Commit: 7a510ac08e52df91b9aa72c29967fc4ac10ce6e4
Parents: 8128119
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Jun 25 10:52:33 2012 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Jun 25 10:54:11 2012 +0200

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 ++
 src/java/org/apache/cassandra/db/Table.java        |    2 +-
 .../cassandra/db/index/SecondaryIndexManager.java  |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a510ac0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 92d1c3e..4842abf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,8 @@
  * Set JVM stack size to 160k for java 7 (CASSANDRA-4275)
  * cqlsh: add COPY command to load data from CSV flat files (CASSANDRA-4012)
  * CFMetaData.fromThrift to throw ConfigurationException upon error (CASSANDRA-4353)
+ * Use CF comparator to sort indexed columns in SecondaryIndexManager
+   (CASSANDRA-4365)
 Merged from 1.0:
  * Set gc_grace on index CF to 0 (CASSANDRA-4314)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a510ac0/src/java/org/apache/cassandra/db/Table.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Table.java b/src/java/org/apache/cassandra/db/Table.java
index c93756c..63e7a96 100644
--- a/src/java/org/apache/cassandra/db/Table.java
+++ b/src/java/org/apache/cassandra/db/Table.java
@@ -415,7 +415,7 @@ public class Table
                         if (cf.getColumnNames().contains(column) || cf.isMarkedForDelete())
                         {
                             if (mutatedIndexedColumns == null)
-                                mutatedIndexedColumns = new TreeSet<ByteBuffer>();
+                                mutatedIndexedColumns = new TreeSet<ByteBuffer>(cf.getComparator());
                             mutatedIndexedColumns.add(column);
                             if (logger.isDebugEnabled())
                             {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a510ac0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index be62206..6733c90 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -67,7 +67,7 @@ public class SecondaryIndexManager
 
     public SecondaryIndexManager(ColumnFamilyStore baseCfs)
     {
-        indexesByColumn = new ConcurrentSkipListMap<ByteBuffer, SecondaryIndex>();
+        indexesByColumn = new ConcurrentSkipListMap<ByteBuffer, SecondaryIndex>(baseCfs.getComparator());
         rowLevelIndexMap = new HashMap<Class<? extends SecondaryIndex>, SecondaryIndex>();
 
         this.baseCfs = baseCfs;


Mime
View raw message