cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [01/19] cassandra git commit: Reduce granuality of OpOrder.Group during index build
Date Tue, 13 Dec 2016 10:37:37 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 9a5aef09f -> fb2940050
  refs/heads/cassandra-3.0 11601e4f4 -> 36ce4e02b
  refs/heads/cassandra-3.11 88c59560c -> 8bbe2f595
  refs/heads/cassandra-3.X 58a29302c -> 6459f5ab1
  refs/heads/trunk 4881d9c30 -> b02dec3da


Reduce granuality of OpOrder.Group during index build

Patch by Milan Majercik; reviewed by Sam Tunnicliffe for CASSANDRA-12796


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

Branch: refs/heads/cassandra-2.2
Commit: fb2940050e27a5642a23f3e9b5aaa7ae65e018b1
Parents: 9a5aef0
Author: mmajercik <mmajercik@specter.firstmobileaffiliate.com>
Authored: Fri Oct 14 15:54:02 2016 +0200
Committer: Sam Tunnicliffe <sam@beobal.com>
Committed: Tue Dec 13 09:57:04 2016 +0000

----------------------------------------------------------------------
 CHANGES.txt                                    |  1 +
 src/java/org/apache/cassandra/db/Keyspace.java | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb294005/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 134a37d..f02350d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796)
  * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980)
  * Do not specify local address on outgoing connection when listen_on_broadcast_address is
set (CASSANDRA-12673)
  * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb294005/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 225369c..c126f5c 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -423,13 +423,12 @@ public class Keyspace
         if (logger.isTraceEnabled())
             logger.trace("Indexing row {} ", cfs.metadata.getKeyValidator().getString(key.getKey()));
 
-        try (OpOrder.Group opGroup = cfs.keyspace.writeOrder.start())
-        {
-            Set<SecondaryIndex> indexes = cfs.indexManager.getIndexesByNames(idxNames);
+        Set<SecondaryIndex> indexes = cfs.indexManager.getIndexesByNames(idxNames);
 
-            Iterator<ColumnFamily> pager = QueryPagers.pageRowLocally(cfs, key.getKey(),
DEFAULT_PAGE_SIZE);
-            while (pager.hasNext())
-            {
+        Iterator<ColumnFamily> pager = QueryPagers.pageRowLocally(cfs, key.getKey(),
DEFAULT_PAGE_SIZE);
+        while (pager.hasNext())
+        {
+            try (OpOrder.Group opGroup = cfs.keyspace.writeOrder.start()) {
                 ColumnFamily cf = pager.next();
                 ColumnFamily cf2 = cf.cloneMeShallow();
                 for (Cell cell : cf)


Mime
View raw message