cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Clean up IndexInfo on keyspace/table drops
Date Tue, 15 Apr 2014 12:23:23 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 6e97178a5 -> fc4ae115a


Clean up IndexInfo on keyspace/table drops

patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for
CASSANDRA-6924


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

Branch: refs/heads/trunk
Commit: b69f5e363b75543429a25b0909b45dff735c64b2
Parents: 6658a6e
Author: beobal <sam@beobal.com>
Authored: Mon Apr 14 20:08:31 2014 +0100
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Apr 15 15:17:58 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                          | 1 +
 src/java/org/apache/cassandra/config/CFMetaData.java | 6 ++++++
 src/java/org/apache/cassandra/config/KSMetaData.java | 1 +
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b69f5e36/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d7c6e71..592eef9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -44,6 +44,7 @@
  * Ensure safe resource cleanup when replacing sstables (CASSANDRA-6912)
  * Add failure handler to async callback (CASSANDRA-6747)
  * Fix AE when closing SSTable without releasing reference (CASSANDRA-7000)
+ * Clean up IndexInfo on keyspace/table drops (CASSANDRA-6924)
 Merged from 2.0:
  * Put nodes in hibernate when join_ring is false (CASSANDRA-6961)
  * Allow compaction of system tables during startup (CASSANDRA-6913)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b69f5e36/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index e930de4..72a0fc5 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -1585,6 +1585,12 @@ public final class CFMetaData
         for (TriggerDefinition td : triggers.values())
             td.deleteFromSchema(mutation, cfName, timestamp);
 
+        for (String indexName : Keyspace.open(this.ksName).getColumnFamilyStore(this.cfName).getBuiltIndexes())
+        {
+            ColumnFamily indexCf = mutation.addOrGet(IndexCf);
+            indexCf.addTombstone(indexCf.getComparator().makeCellName(indexName), ldt, timestamp);
+        }
+
         return mutation;
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b69f5e36/src/java/org/apache/cassandra/config/KSMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java b/src/java/org/apache/cassandra/config/KSMetaData.java
index 3d1edb6..d0cb613 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -242,6 +242,7 @@ public final class KSMetaData
         mutation.delete(SystemKeyspace.SCHEMA_COLUMNS_CF, timestamp);
         mutation.delete(SystemKeyspace.SCHEMA_TRIGGERS_CF, timestamp);
         mutation.delete(SystemKeyspace.SCHEMA_USER_TYPES_CF, timestamp);
+        mutation.delete(SystemKeyspace.INDEX_CF, timestamp);
 
         return mutation;
     }


Mime
View raw message