cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r810311 - /incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Tue, 01 Sep 2009 23:38:31 GMT
Author: jbellis
Date: Tue Sep  1 23:38:31 2009
New Revision: 810311

URL: http://svn.apache.org/viewvc?rev=810311&view=rev
Log:
Do not delete corrupt sstables on startup; skip it and let an operator intervene instead.
 Patch by Chris Goffinet; reviewed by jbellis for CASSANDRA-343

Modified:
    incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=810311&r1=810310&r2=810311&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Tue Sep  1 23:38:31 2009
@@ -175,16 +175,17 @@
         for (File file : sstableFiles)
         {
             String filename = file.getAbsolutePath();
+            SSTableReader sstable;
             try
             {
-                SSTableReader sstable = SSTableReader.open(filename);
-                ssTables_.put(filename, sstable);
+                sstable = SSTableReader.open(filename);
             }
             catch (IOException ex)
             {
-                logger_.error("Corrupt file " + filename, ex);
-                FileUtils.delete(filename);
+                logger_.error("Corrupt file " + filename + "; skipped", ex);
+                continue;
             }
+            ssTables_.put(filename, sstable);
         }
 
         // submit initial check-for-compaction request



Mime
View raw message