Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 aefea62a0 -> fc972b9f2
  refs/heads/cassandra-3.0 01048346e -> 1de534276
  refs/heads/cassandra-3.5 df18c9b6c -> daf7606a6
  refs/heads/trunk b5b2ffa8d -> 93c750ae3


Use noop index updater during compaction when appropriate

Patch by Dikang Gu; reviewed by Sam Tunnicliffe for CASSANDRA-11450


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

Branch: refs/heads/cassandra-2.2
Commit: a821539bc3eb90f204064b3fd9f86b7253d2b84b
Parents: aefea62
Author: Dikang Gu <dikan...@gmail.com>
Authored: Mon Mar 28 12:55:54 2016 -0700
Committer: Sam Tunnicliffe <s...@beobal.com>
Committed: Tue Mar 29 12:45:07 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 .../org/apache/cassandra/db/index/SecondaryIndexManager.java     | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a821539b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5e8828b..6e43496 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.6
+ * Fix use of NullUpdater for 2i during compaction (CASSANDRA-11450)
  * Notify when sstables change after cancelling compaction (CASSANDRA-11373)
  * cqlsh: COPY FROM should check that explicit column names are valid 
(CASSANDRA-11333)
  * Add -Dcassandra.start_gossip startup option (CASSANDRA-10809)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a821539b/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 f7abc54..26327d4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -511,7 +511,9 @@ public class SecondaryIndexManager
      */
     public Updater gcUpdaterFor(DecoratedKey key)
     {
-        return new GCUpdater(key);
+        return (indexesByColumn.isEmpty() && rowLevelIndexMap.isEmpty())
+               ? nullUpdater
+               : new GCUpdater(key);
     }
 
     /**

Reply via email to