cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1003635 - /cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java
Date Fri, 01 Oct 2010 20:26:25 GMT
Author: jbellis
Date: Fri Oct  1 20:26:25 2010
New Revision: 1003635

URL: http://svn.apache.org/viewvc?rev=1003635&view=rev
Log:
scrub System keyspace before opening it
patch by jbellis; reviewed by gdusbabek for CASSANDRA-1564

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java?rev=1003635&r1=1003634&r2=1003635&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java Fri
Oct  1 20:26:25 2010
@@ -93,7 +93,11 @@ public abstract class AbstractCassandraD
             }
         });
         
-        // check the system table for mismatched partitioner.
+        // check the system table to keep user from shooting self in foot by changing partitioner,
cluster name, etc.
+        // we do a one-off scrub of the system table first; we can't load the list of the
rest of the tables,
+        // until system table is opened.
+        for (CFMetaData cfm : DatabaseDescriptor.getTableMetaData(Table.SYSTEM_TABLE).values())
+            ColumnFamilyStore.scrubDataDirectories(Table.SYSTEM_TABLE, cfm.cfName);
         try
         {
             SystemTable.checkHealth();
@@ -115,7 +119,7 @@ public abstract class AbstractCassandraD
             System.exit(100);
         }
         
-        // clean up debris.
+        // clean up debris in the rest of the tables
         for (String table : DatabaseDescriptor.getTables()) 
         {
             for (CFMetaData cfm : DatabaseDescriptor.getTableMetaData(table).values())



Mime
View raw message