cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/3] git commit: Pass mutated cf to index updater for use by PRSI
Date Tue, 12 Aug 2014 00:35:16 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 0eb9e8cfb -> c7ebc01bb


Pass mutated cf to index updater for use by PRSI

patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for
CASSANDRA-7742


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

Branch: refs/heads/trunk
Commit: 59806a8f8328250d19b3b7964ac767fe4561f429
Parents: abd1bae
Author: Sam Tunnicliffe <sam@beobal.com>
Authored: Tue Aug 12 03:32:29 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Aug 12 03:32:29 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 src/java/org/apache/cassandra/db/Keyspace.java               | 4 +++-
 .../org/apache/cassandra/db/index/SecondaryIndexManager.java | 8 --------
 .../apache/cassandra/db/index/PerRowSecondaryIndexTest.java  | 2 +-
 4 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59806a8f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f34b912..a426df4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-rc6
+ * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742)
  * Include stress yaml example in release and deb (CASSANDRA-7717)
  * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695)
  * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59806a8f/src/java/org/apache/cassandra/db/Keyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Keyspace.java b/src/java/org/apache/cassandra/db/Keyspace.java
index ff4d272..5770304 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -388,7 +388,9 @@ public class Keyspace
                 }
 
                 Tracing.trace("Adding to {} memtable", cf.metadata().cfName);
-                SecondaryIndexManager.Updater updater = updateIndexes ? cfs.indexManager.updaterFor(key,
opGroup) : SecondaryIndexManager.nullUpdater;
+                SecondaryIndexManager.Updater updater = updateIndexes
+                                                      ? cfs.indexManager.updaterFor(key,
cf, opGroup)
+                                                      : SecondaryIndexManager.nullUpdater;
                 cfs.apply(key, cf, updater, opGroup, replayPosition);
             }
         }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59806a8f/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 339af8f..c184097 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -512,14 +512,6 @@ public class SecondaryIndexManager
     /**
      * Updated closure with only the modified row key.
      */
-    public Updater updaterFor(DecoratedKey key, OpOrder.Group opGroup)
-    {
-        return updaterFor(key, null, opGroup);
-    }
-
-    /**
-     * Updated closure with only the modified row key.
-     */
     public Updater gcUpdaterFor(DecoratedKey key)
     {
         return new GCUpdater(key);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59806a8f/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
index 158dd2c..de78594 100644
--- a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
+++ b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
@@ -132,7 +132,7 @@ public class PerRowSecondaryIndexTest extends SchemaLoader
             QueryFilter filter = QueryFilter.getIdentityFilter(DatabaseDescriptor.getPartitioner().decorateKey(rowKey),
                                                                baseCfs.getColumnFamilyName(),
                                                                System.currentTimeMillis());
-            LAST_INDEXED_ROW = baseCfs.getColumnFamily(filter);
+            LAST_INDEXED_ROW = cf;
             LAST_INDEXED_KEY = rowKey;
         }
 


Mime
View raw message