cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1090007 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java
Date Thu, 07 Apr 2011 20:59:42 GMT
Author: slebresne
Date: Thu Apr  7 20:59:41 2011
New Revision: 1090007

URL: http://svn.apache.org/viewvc?rev=1090007&view=rev
Log:
Don't all cleanup if ring is not joined (since this wiped all data)
patch by slebresne; reviewed by jbellis for CASSANDRA-2428

Modified:
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java?rev=1090007&r1=1090006&r2=1090007&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java
Thu Apr  7 20:59:41 2011
@@ -681,6 +681,11 @@ public class CompactionManager implement
         assert !cfs.isIndex();
         Table table = cfs.table;
         Collection<Range> ranges = StorageService.instance.getLocalRanges(table.name);
+        if (ranges.isEmpty())
+        {
+            logger.info("Cleanup cannot be ran before the node join the ring");
+            return;
+        }
 
         for (SSTableReader sstable : cfs.getSSTables())
         {



Mime
View raw message