cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix forceBlockingFlush behavior
Date Fri, 15 Feb 2013 22:09:40 GMT
Updated Branches:
  refs/heads/cassandra-1.2 0981e9a24 -> 86063aa20


Fix forceBlockingFlush behavior

patch by krummas; reviewed by slebresne for CASSANDRA-5241


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

Branch: refs/heads/cassandra-1.2
Commit: 86063aa2087b5b0bb9eff6458b528f74a39eaf02
Parents: 0981e9a
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Feb 15 23:06:53 2013 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Feb 15 23:09:27 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 +-
 .../org/apache/cassandra/db/ColumnFamilyStore.java |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/86063aa2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f8deb34..ad8c3f2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,8 +23,8 @@
  * Add CQL3-based implementations of IAuthenticator and IAuthorizer
    (CASSANDRA-4898)
  * Fix timestamp-based tomstone removal logic (CASSANDRA-5248)
-Merged from 1.1:
  * cli: Add JMX authentication support (CASSANDRA-5080)
+ * Fix forceFlush behavior (CASSANDRA-5241)
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/86063aa2/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 6043be5..c08224e 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -689,8 +689,17 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
 
         if (clean)
         {
-            logger.debug("forceFlush requested but everything is clean in {}", columnFamily);
-            return Futures.immediateCheckedFuture(null);
+            // We could have a memtable for this column family that is being
+            // flushed. Make sure the future returned wait for that so callers can
+            // assume that any data inserted prior to the call are fully flushed
+            // when the future returns (see #5241).
+            return postFlushExecutor.submit(new Runnable()
+            {
+                public void run()
+                {
+                    logger.debug("forceFlush requested but everything is clean in {}", columnFamily);
+                }
+            });
         }
 
         return switchMemtable(true, false);


Mime
View raw message