cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Avoid NPEs when receiving table changes for an unknown keyspace
Date Mon, 04 Aug 2014 18:11:49 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 a31441f01 -> 729d0b8aa


Avoid NPEs when receiving table changes for an unknown keyspace

patch by Robert Stupp; reviewed by Aleksey Yeschenko for CASSANDRA-7689


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

Branch: refs/heads/cassandra-2.1
Commit: 729d0b8aaf15a3c1e9ab62b97d06ba492c00cfee
Parents: a31441f
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Mon Aug 4 21:10:48 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon Aug 4 21:10:48 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 src/java/org/apache/cassandra/service/MigrationManager.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/729d0b8a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2d00cb4..897119b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689)
  * Add support for custom 2i validation (CASSANDRA-7575)
  * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
  * Add listen_interface and rpc_interface options (CASSANDRA-7417)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/729d0b8a/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java
index 6d28f62..bdae208 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -256,7 +256,7 @@ public class MigrationManager
 
     public static void announceNewType(UserType newType, boolean announceLocally)
     {
-        announce(UTMetaData.toSchema(newType, FBUtilities.timestampMicros()), announceLocally);
+        announce(addSerializedKeyspace(UTMetaData.toSchema(newType, FBUtilities.timestampMicros()),
newType.keyspace), announceLocally);
     }
 
     public static void announceKeyspaceUpdate(KSMetaData ksm) throws ConfigurationException
@@ -349,7 +349,7 @@ public class MigrationManager
 
     public static void announceTypeDrop(UserType droppedType, boolean announceLocally)
     {
-        announce(UTMetaData.dropFromSchema(droppedType, FBUtilities.timestampMicros()), announceLocally);
+        announce(addSerializedKeyspace(UTMetaData.dropFromSchema(droppedType, FBUtilities.timestampMicros()),
droppedType.keyspace), announceLocally);
     }
 
     /**


Mime
View raw message