cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Fix PRSI handling of CQL3 row markers for row cleanup
Date Tue, 19 Aug 2014 13:19:26 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 fabdd431a -> 579222e9d


Fix PRSI handling of CQL3 row markers for row cleanup

patch by Berenguer Blasi; reviewed by Aleksey Yeschenko for
CASSANDRA-7787


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

Branch: refs/heads/cassandra-2.1.0
Commit: 7554eb5316c63ef3eeda652e84daabed705eb5a8
Parents: 36382e5
Author: Berenguer Blasi <bblasi@jblasi.com>
Authored: Tue Aug 19 16:12:19 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Aug 19 16:12:19 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../db/index/SecondaryIndexManager.java         | 27 +++++++++-----------
 2 files changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7554eb53/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6c2ba2c..0ac1fb6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787)
  * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577)
  * Fix dropping collection when it's the last regular column (CASSANDRA-7744)
  * Properly reject operations on list index with conditions (CASSANDRA-7499)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7554eb53/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 a15464a..a54882d 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -454,22 +454,19 @@ public class SecondaryIndexManager
 
         for (Column column : indexedColumnsInRow)
         {
-            ColumnDefinition cDef = baseCfs.metadata.getColumnDefinitionFromColumnName(column.name());
-            SecondaryIndex index = indexesByColumn.get(cDef.name);
-            if (index == null)
-                continue;
-
-            if (index instanceof PerRowSecondaryIndex)
-            {
-                if (cleanedRowLevelIndexes == null)
-                    cleanedRowLevelIndexes = new HashSet<>();
-
-                if (cleanedRowLevelIndexes.add(index.getClass()))
-                    ((PerRowSecondaryIndex)index).delete(key);
-            }
-            else
+            for (SecondaryIndex index : indexFor(column.name()))
             {
-                ((PerColumnSecondaryIndex) index).delete(key.key, column);
+                if (index instanceof PerRowSecondaryIndex)
+                {
+                    if (cleanedRowLevelIndexes == null)
+                        cleanedRowLevelIndexes = new HashSet<>();
+                    if (cleanedRowLevelIndexes.add(index.getClass()))
+                        ((PerRowSecondaryIndex) index).delete(key);
+                }
+                else
+                {
+                    ((PerColumnSecondaryIndex) index).delete(key.key, column);
+                }
             }
         }
     }


Mime
View raw message