cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1196587 - in /cassandra/branches/cassandra-1.0: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
Date Wed, 02 Nov 2011 13:56:21 GMT
Author: jake
Date: Wed Nov  2 13:56:20 2011
New Revision: 1196587

URL: http://svn.apache.org/viewvc?rev=1196587&view=rev
Log:
Fix bug that skips first column in PerRowSecondary Indexes
patch by tjake; reviewed by Jason Rutherglen for CASSANDRA-3441


Modified:
    cassandra/branches/cassandra-1.0/CHANGES.txt
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java

Modified: cassandra/branches/cassandra-1.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/CHANGES.txt?rev=1196587&r1=1196586&r2=1196587&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0/CHANGES.txt Wed Nov  2 13:56:20 2011
@@ -7,7 +7,7 @@
  * Avoid large array allocation for compressed chunk offsets (CASSANDRA-3432)
 Merged from 0.8:
  * acquire compactionlock during truncate (CASSANDRA-3399)
-
+ * fix bug that caused first column in per row indexes to be ignored (CASSANDRA-3441)
 
 1.0.1
  * acquire references during index build to prevent delete problems

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java?rev=1196587&r1=1196586&r2=1196587&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
Wed Nov  2 13:56:20 2011
@@ -379,9 +379,9 @@ public class SecondaryIndexManager
                 {
                     if (appliedRowLevelIndexes == null)
                         appliedRowLevelIndexes = new HashSet<Class<? extends SecondaryIndex>>();
-                    else
-                        if (appliedRowLevelIndexes.add(index.getClass()))
-                            ((PerRowSecondaryIndex)index).applyIndexUpdates(rowKey, cf, mutatedIndexedColumns,
oldIndexedColumns);
+                    
+                    if (appliedRowLevelIndexes.add(index.getClass()))
+                        ((PerRowSecondaryIndex)index).applyIndexUpdates(rowKey, cf, mutatedIndexedColumns,
oldIndexedColumns);
                 }
                 else
                 {
@@ -411,9 +411,9 @@ public class SecondaryIndexManager
             {
                 if (appliedRowLevelIndexes == null)
                     appliedRowLevelIndexes = new HashSet<Class<? extends SecondaryIndex>>();
-                else
-                    if (appliedRowLevelIndexes.add(index.getClass()))
-                        ((PerRowSecondaryIndex)index).applyIndexUpdates(rowKey, cf, mutatedIndexedColumns,
oldIndexedColumns);
+                
+                if (appliedRowLevelIndexes.add(index.getClass()))
+                    ((PerRowSecondaryIndex)index).applyIndexUpdates(rowKey, cf, mutatedIndexedColumns,
oldIndexedColumns);
             }
             else
             {
@@ -448,9 +448,9 @@ public class SecondaryIndexManager
             {
                 if (cleanedRowLevelIndexes == null)
                     cleanedRowLevelIndexes = new HashSet<Class<? extends SecondaryIndex>>();
-                else
-                    if (cleanedRowLevelIndexes.add(index.getClass()))
-                        ((PerRowSecondaryIndex)index).deleteFromIndex(key, indexedColumnsInRow);
            
+                
+                if (cleanedRowLevelIndexes.add(index.getClass()))
+                    ((PerRowSecondaryIndex)index).deleteFromIndex(key, indexedColumnsInRow);
            
             }
             else
             {



Mime
View raw message