cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: CASSANDRA-6876 follow-up
Date Thu, 20 Mar 2014 13:49:06 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 dd276ebb5 -> 922f5af10


CASSANDRA-6876 follow-up


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

Branch: refs/heads/cassandra-2.0
Commit: 922f5af10357a1933aadfa70ccb649ee3f0b6188
Parents: dd276eb
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Thu Mar 20 16:48:56 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Thu Mar 20 16:48:56 2014 +0300

----------------------------------------------------------------------
 .../cassandra/db/index/SecondaryIndexManager.java     | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/922f5af1/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 5e49966..9600099 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -222,18 +222,22 @@ public class SecondaryIndexManager
         if (index == null)
             return;
 
-        // Remove this column from from row level index map
+        // Remove this column from from row level index map as well as all indexes set
         if (index instanceof PerRowSecondaryIndex)
         {
             index.removeColumnDef(column);
 
-            //If now columns left on this CF remove from row level lookup
+            // If no columns left remove from row level lookup as well as all indexes set
             if (index.getColumnDefs().isEmpty())
+            {
+                allIndexes.remove(index);
                 rowLevelIndexMap.remove(index.getClass());
+            }
+        }
+        else
+        {
+            allIndexes.remove(index);
         }
-
-        // Remove from all indexes set:
-        allIndexes.remove(index);
 
         index.removeIndex(column);
         SystemKeyspace.setIndexRemoved(baseCfs.metadata.ksName, index.getNameForSystemKeyspace(column));


Mime
View raw message