cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/5] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Date Thu, 07 Aug 2014 16:36:42 GMT
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
	src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java


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

Branch: refs/heads/trunk
Commit: d8eff03df0bbfa9066855bc49e18d76f609508a0
Parents: 33de6dc 3970c65
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Aug 7 18:32:36 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Aug 7 18:32:36 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                               |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++++++
 .../org/apache/cassandra/db/index/SecondaryIndex.java     | 10 ++++++++++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index dfeca21,df40933..26b39e0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
   * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index a2011b6,87e87cb..d8c03fb
--- a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -60,20 -55,15 +60,26 @@@ public abstract class AbstractSimplePer
                                                               indexedCfMetadata);
      }
  
 +    protected AbstractType<?> getIndexKeyComparator()
 +    {
 +        return columnDef.type;
 +    }
 +
 +    @Override
 +    public DecoratedKey getIndexKeyFor(ByteBuffer value)
 +    {
 +        return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), value), value);
 +    }
 +
+     @Override
+     String indexTypeForGrouping()
+     {
+         return "_internal_";
+     }
+ 
 -    protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, Column column);
 +    protected abstract CellName makeIndexColumnName(ByteBuffer rowKey, Cell cell);
  
 -    protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column column);
 +    protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Cell cell);
  
      protected abstract AbstractType getExpressionComparator();
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index edb9126,a15464a..339af8f
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@@ -547,10 -518,10 +547,10 @@@ public class SecondaryIndexManage
              if (columns == null)
              {
                  columns = new HashSet<>();
-                 groupByIndexType.put(index.getClass().getCanonicalName(), columns);
+                 groupByIndexType.put(index.indexTypeForGrouping(), columns);
              }
  
 -            columns.add(ix.column_name);
 +            columns.add(ix.column);
          }
  
          List<SecondaryIndexSearcher> indexSearchers = new ArrayList<>(groupByIndexType.size());


Mime
View raw message