You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2016/02/01 09:48:55 UTC

[2/6] cassandra git commit: Invalidate legacy schema tables when unloading them

Invalidate legacy schema tables when unloading them

Patch by Mike Adamson; reviewed by Sam Tunnicliffe for CASSANDRA-11071


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

Branch: refs/heads/cassandra-3.3
Commit: b554cb3da327a7522dbd60209421073bbe10317c
Parents: 682812d
Author: Mike Adamson <ma...@datastax.com>
Authored: Wed Jan 27 12:36:36 2016 +0000
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Mon Feb 1 08:41:41 2016 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/schema/LegacySchemaMigrator.java | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b554cb3d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1a1abc0..7a42916 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.3
+ * Invalidate legacy schema tables when unloading them (CASSANDRA-11071)
  * (cqlsh) handle INSERT and UPDATE statements with LWT conditions correctly
    (CASSANDRA-11003)
  * Fix DISTINCT queries in mixed version clusters (CASSANDRA-10762)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b554cb3d/src/java/org/apache/cassandra/schema/LegacySchemaMigrator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/schema/LegacySchemaMigrator.java b/src/java/org/apache/cassandra/schema/LegacySchemaMigrator.java
index 3588a92..afa0f38 100644
--- a/src/java/org/apache/cassandra/schema/LegacySchemaMigrator.java
+++ b/src/java/org/apache/cassandra/schema/LegacySchemaMigrator.java
@@ -133,6 +133,7 @@ public final class LegacySchemaMigrator
             systemTables = systemTables.without(table.cfName);
 
         LegacySchemaTables.forEach(Schema.instance::unload);
+        LegacySchemaTables.forEach((cfm) -> org.apache.cassandra.db.Keyspace.openAndGetStore(cfm).invalidate());
 
         Schema.instance.setKeyspaceMetadata(systemKeyspace.withSwapped(systemTables));
     }