cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/9] git commit: kill startup on incompatible sstable instead of continuing and failing later
Date Fri, 28 Feb 2014 16:08:39 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 cdd3625db -> 319b42e58
  refs/heads/cassandra-2.1 38a3181b0 -> b41eb4ad7
  refs/heads/trunk b23d6ba0b -> 3c186bef8


kill startup on incompatible sstable instead of continuing and failing later


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4eb21ea7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4eb21ea7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4eb21ea7

Branch: refs/heads/cassandra-2.0
Commit: 4eb21ea7aad3dedcb32621e8f04f4a763a4d0a7c
Parents: cdd3625
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Feb 28 10:05:18 2014 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Feb 28 10:05:18 2014 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eb21ea7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 2604375..4acae0b 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -387,12 +387,12 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         return data.getMeanColumns();
     }
 
-    public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, String columnFamily,
boolean loadSSTables)
+    public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, String columnFamily,
boolean loadSSTables) throws ConfigurationException
     {
         return createColumnFamilyStore(keyspace, columnFamily, StorageService.getPartitioner(),
Schema.instance.getCFMetaData(keyspace.getName(), columnFamily), loadSSTables);
     }
 
-    public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, String columnFamily,
IPartitioner partitioner, CFMetaData metadata)
+    public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, String columnFamily,
IPartitioner partitioner, CFMetaData metadata) throws ConfigurationException
     {
         return createColumnFamilyStore(keyspace, columnFamily, partitioner, metadata, true);
     }
@@ -401,7 +401,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
                                                                          String columnFamily,
                                                                          IPartitioner partitioner,
                                                                          CFMetaData metadata,
-                                                                         boolean loadSSTables)
+                                                                         boolean loadSSTables)
throws ConfigurationException
     {
         // get the max generation number, to prevent generation conflicts
         Directories directories = Directories.create(keyspace.getName(), columnFamily);
@@ -412,7 +412,8 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
             Descriptor desc = entry.getKey();
             generations.add(desc.generation);
             if (!desc.isCompatible())
-                logger.warn(String.format("Old SSTable found: Current version %s, found file:
%s.  Please run upgradesstables.", Descriptor.Version.CURRENT, desc));
+                throw new ConfigurationException(String.format("Incompatible SSTable found.
 Current version %s is unable to read file: %s.  Please run upgradesstables.",
+                                                               Descriptor.Version.CURRENT,
desc));
         }
         Collections.sort(generations);
         int value = (generations.size() > 0) ? (generations.get(generations.size() - 1))
: 0;


Mime
View raw message