Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 36382e547 -> 7554eb531
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.0 Commit: 7554eb5316c63ef3eeda652e84daabed705eb5a8 Parents: 36382e5 Author: Berenguer Blasi <bbl...@jblasi.com> Authored: Tue Aug 19 16:12:19 2014 +0300 Committer: Aleksey Yeschenko <alek...@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); + } } } }