cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [01/13] cassandra git commit: Fix index build regression from 9669.
Date Tue, 31 May 2016 08:45:21 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 6add3c9ac -> 66c8f2b7f
  refs/heads/cassandra-3.0 8540415a6 -> 81ffc4601
  refs/heads/cassandra-3.7 4e255244e -> e23d1d926
  refs/heads/trunk 72a053629 -> a47e46905


Fix index build regression from 9669.

Patch by Branimir Lambov; reviewed by Sam Tunnicliffe for CASSANDRA-9669


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

Branch: refs/heads/cassandra-2.2
Commit: 66c8f2b7f79fe794cc1e0594d9add260c209a9a2
Parents: 6add3c9
Author: Branimir Lambov <branimir.lambov@datastax.com>
Authored: Thu May 26 12:44:16 2016 +0300
Committer: Sam Tunnicliffe <sam@beobal.com>
Committed: Tue May 31 09:22:09 2016 +0100

----------------------------------------------------------------------
 .../org/apache/cassandra/db/ColumnFamilyStore.java     | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/66c8f2b7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 45486c1..d86f941 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -937,11 +937,14 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
      */
     public ListenableFuture<ReplayPosition> forceFlush()
     {
-        Memtable current = data.getView().getCurrentMemtable();
-        for (ColumnFamilyStore cfs : concatWithIndexes())
-            if (!cfs.data.getView().getCurrentMemtable().isClean())
-                return switchMemtableIfCurrent(current);
-        return waitForFlushes();
+        synchronized (data)
+        {
+            Memtable current = data.getView().getCurrentMemtable();
+            for (ColumnFamilyStore cfs : concatWithIndexes())
+                if (!cfs.data.getView().getCurrentMemtable().isClean())
+                    return switchMemtableIfCurrent(current);
+            return waitForFlushes();
+        }
     }
 
     /**


Mime
View raw message