cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [03/20] cassandra git commit: Use noop index updater during compaction when appropriate
Date Tue, 29 Mar 2016 12:02:16 GMT
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-3.5
Commit: a821539bc3eb90f204064b3fd9f86b7253d2b84b
Parents: aefea62
Author: Dikang Gu <dikang85@gmail.com>
Authored: Mon Mar 28 12:55:54 2016 -0700
Committer: Sam Tunnicliffe <sam@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);
     }
 
     /**


Mime
View raw message