cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r986103 - in /cassandra/trunk/src/java/org/apache/cassandra: db/DefinitionsUpdateResponseVerbHandler.java service/MigrationManager.java
Date Mon, 16 Aug 2010 19:25:12 GMT
Author: gdusbabek
Date: Mon Aug 16 19:25:12 2010
New Revision: 986103

URL: http://svn.apache.org/viewvc?rev=986103&view=rev
Log:
trap ConfigExceptions so they don't become RTEs. patch by gdusbabek, reviewed by jbellis.
CASSANDRA-1384

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/db/DefinitionsUpdateResponseVerbHandler.java
    cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/DefinitionsUpdateResponseVerbHandler.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/DefinitionsUpdateResponseVerbHandler.java?rev=986103&r1=986102&r2=986103&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/DefinitionsUpdateResponseVerbHandler.java
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/DefinitionsUpdateResponseVerbHandler.java
Mon Aug 16 19:25:12 2010
@@ -19,6 +19,7 @@
 package org.apache.cassandra.db;
 
 import org.apache.cassandra.concurrent.StageManager;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.migration.Migration;
 import org.apache.cassandra.net.IVerbHandler;
@@ -67,7 +68,14 @@ public class DefinitionsUpdateResponseVe
                             else
                             {
                                 logger.debug("Applying {} from {}", m.getClass().getSimpleName(),
message.getFrom());
-                                m.apply();
+                                try
+                                {
+                                    m.apply();
+                                }
+                                catch (ConfigurationException ex)
+                                {
+                                    logger.info("Migration not applied " + ex.getMessage());
+                                }
                                 m.announce();
                             }
                         }

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java?rev=986103&r1=986102&r2=986103&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java Mon Aug 16
19:25:12 2010
@@ -111,7 +111,7 @@ public class MigrationManager implements
      * This method silently eats IOExceptions thrown by Migration.apply() as a result of
applying a migration out of
      * order.
      */
-    public static void applyMigrations(UUID from, UUID to) throws IOException
+    public static void applyMigrations(final UUID from, final UUID to) throws IOException
     {
         List<Future> updates = new ArrayList<Future>();
         Collection<IColumn> migrations = Migration.getLocalMigrations(from, to);
@@ -129,6 +129,7 @@ public class MigrationManager implements
                     catch (ConfigurationException ex)
                     {
                         // this happens if we try to apply something that's already been
applied. ignore and proceed.
+                        logger.debug("Migration not applied " + ex.getMessage());
                     }
                     catch (IOException ex)
                     {



Mime
View raw message