cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [1/2] cassandra git commit: Fix double flushing of secondary index tables
Date Tue, 25 Aug 2015 21:38:14 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4acd4bbca -> e37efea67


Fix double flushing of secondary index tables

Patch by Tyler Hobbs; reviewed by Sam Tunnicliffe for CASSANDRA-10180


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

Branch: refs/heads/trunk
Commit: b8172dcaa8560bb7e3c51d78f6760a4e52c06910
Parents: f545a70
Author: Tyler Hobbs <tylerlhobbs@gmail.com>
Authored: Tue Aug 25 13:31:41 2015 -0500
Committer: Tyler Hobbs <tylerlhobbs@gmail.com>
Committed: Tue Aug 25 16:37:14 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8172dca/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 124821f..4a3dc02 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.0-beta2
+ * Fix double flushing of secondary index tables (CASSANDRA-10180)
  * Fix incorrect handling of range tombstones in thrift (CASSANDRA-10046)
  * Only use batchlog when paired materialized view replica is remote (CASSANDRA-10061)
  * Reuse TemporalRow when updating multiple MaterializedViews (CASSANDRA-10060)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8172dca/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
index 5d32b70..6bff916 100644
--- a/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
@@ -341,7 +341,7 @@ public class SecondaryIndexManager implements IndexRegistry
             indexes.forEach(index ->
                 index.getBackingTable()
                      .map(cfs -> wait.add(cfs.forceFlush()))
-                     .orElse(nonCfsIndexes.add(index)));
+                     .orElseGet(() -> nonCfsIndexes.add(index)));
         }
         executeAllBlocking(nonCfsIndexes.stream(), Index::getBlockingFlushTask);
         FBUtilities.waitOnFutures(wait);


Mime
View raw message