cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1003595 - in /cassandra/trunk: CHANGES.txt src/java/org/apache/cassandra/db/SystemTable.java
Date Fri, 01 Oct 2010 17:56:15 GMT
Author: jbellis
Date: Fri Oct  1 17:56:14 2010
New Revision: 1003595

URL: http://svn.apache.org/viewvc?rev=1003595&view=rev
Log:
flush index built flag so we can read it before log replay
patch by jbellis; reviewed by Stu Hood for CASSANDRA-1541

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1003595&r1=1003594&r2=1003595&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Fri Oct  1 17:56:14 2010
@@ -4,6 +4,7 @@ dev
  * re-organize JMX into .db, .net, .internal, .request (CASSANDRA-1217)
  * allow nodes to change IPs between restarts (CASSANDRA-1518)
  * remember ring state between restarts by default (CASSANDRA-1518)
+ * flush index built flag so we can read it before log replay (CASSANDRA-1541)
 
 
 0.7-beta2

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java?rev=1003595&r1=1003594&r2=1003595&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java Fri Oct  1 17:56:14
2010
@@ -141,9 +141,14 @@ public class SystemTable
             throw new IOError(e);
         }
 
+        forceBlockingFlush(STATUS_CF);
+    }
+
+    private static void forceBlockingFlush(String cfname)
+    {
         try
         {
-            Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(SystemTable.STATUS_CF).forceBlockingFlush();
+            Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(cfname).forceBlockingFlush();
         }
         catch (ExecutionException e)
         {
@@ -283,18 +288,7 @@ public class SystemTable
         cf.addColumn(new Column(GENERATION, FBUtilities.toByteArray(generation), genClock));
         rm.add(cf);
         rm.apply();
-        try
-        {
-            table.getColumnFamilyStore(SystemTable.STATUS_CF).forceBlockingFlush();
-        }
-        catch (ExecutionException e)
-        {
-            throw new RuntimeException(e);
-        }
-        catch (InterruptedException e)
-        {
-            throw new AssertionError(e);
-        }
+        forceBlockingFlush(STATUS_CF);
 
         return generation;
     }
@@ -348,5 +342,7 @@ public class SystemTable
         {
             throw new IOError(e);
         }
+
+        forceBlockingFlush(INDEX_CF);
     }
 }



Mime
View raw message