cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: add DMP.ignore to avoid surprises when upgrading w/ old config file
Date Fri, 24 Aug 2012 20:36:18 GMT
Updated Branches:
  refs/heads/trunk d9c70e1d3 -> e1ee63602


add DMP.ignore to avoid surprises when upgrading w/ old config file


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

Branch: refs/heads/trunk
Commit: e1ee636026ffc1bfde2a500a766ddcfda2a52b4d
Parents: d9c70e1
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Aug 24 15:35:53 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Aug 24 15:35:53 2012 -0500

----------------------------------------------------------------------
 conf/cassandra.yaml                                |    1 +
 src/java/org/apache/cassandra/config/Config.java   |    5 +++--
 .../apache/cassandra/service/CassandraDaemon.java  |    3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1ee6360/conf/cassandra.yaml
----------------------------------------------------------------------
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index b308b5c..40d7ff8 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -98,6 +98,7 @@ commitlog_directory: /var/lib/cassandra/commitlog
 # best_effort: stop using the failed disk and respond to requests based on
 #              remaining available sstables.  This means you WILL see obsolete
 #              data at CL.ONE!
+# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
 disk_failure_policy: stop
 
 # Maximum size of the key cache in memory.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1ee6360/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index d66c79d..83c18a4 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -40,7 +40,7 @@ public class Config
     public SeedProviderDef seed_provider;
     public DiskAccessMode disk_access_mode = DiskAccessMode.auto;
 
-    public DiskFailurePolicy disk_failure_policy = DiskFailurePolicy.best_effort;
+    public DiskFailurePolicy disk_failure_policy = DiskFailurePolicy.ignore;
 
     /* initial token in the ring */
     public String initial_token;
@@ -198,7 +198,8 @@ public class Config
     public static enum DiskFailurePolicy
     {
         best_effort,
-        stop
+        stop,
+        ignore,
     }
 
     public static enum RequestSchedulerId

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1ee6360/src/java/org/apache/cassandra/service/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index ed68a1b..22a2066 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -162,6 +162,9 @@ public class CassandraDaemon
                                 Table.removeUnreadableSSTables(directory);
                         }
                         break;
+                    case ignore:
+                        // already logged, so left nothing to do
+                        break;
                     default:
                         throw new IllegalStateException();
                 }


Mime
View raw message