cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r803211 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra/db: BinaryMemtable.java BinaryMemtableManager.java ColumnFamilyStore.java
Date Tue, 11 Aug 2009 17:17:21 GMT
Author: jbellis
Date: Tue Aug 11 17:17:21 2009
New Revision: 803211

URL: http://svn.apache.org/viewvc?rev=803211&view=rev
Log:
use CFS executor for BMt flushes.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-337

Removed:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtableManager.java
Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtable.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtable.java?rev=803211&r1=803210&r2=803211&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtable.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtable.java Tue Aug
11 17:17:21 2009
@@ -104,7 +104,7 @@
                 if (!isFrozen_)
                 {
                     isFrozen_ = true;
-                    BinaryMemtableManager.instance().submit(cfStore.getColumnFamilyName(),
this);
+                    cfStore.submitFlush(this);
                     cfStore.switchBinaryMemtable(key, buffer);
                 }
                 else

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=803211&r1=803210&r2=803211&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Tue
Aug 11 17:17:21 2009
@@ -466,7 +466,7 @@
 
     void forceFlushBinary()
     {
-        BinaryMemtableManager.instance().submit(getColumnFamilyName(), binaryMemtable_.get());
+        submitFlush(binaryMemtable_.get());
     }
 
     /**
@@ -1248,6 +1248,25 @@
         });
     }
 
+    static void submitFlush(final BinaryMemtable binaryMemtable)
+    {
+        logger_.info("Enqueuing flush of " + binaryMemtable);
+        flusher_.submit(new Runnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    binaryMemtable.flush();
+                }
+                catch (IOException e)
+                {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+    }
+
     public boolean isSuper()
     {
         return isSuper_;



Mime
View raw message