cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/6] git commit: Invalidate row cache when dropping CF patch by Fabien Rousseau; reviewed by jbellis for CASSANDRA-6351
Date Sat, 16 Nov 2013 17:11:11 GMT
Invalidate row cache when dropping CF
patch by Fabien Rousseau; reviewed by jbellis for CASSANDRA-6351


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

Branch: refs/heads/cassandra-2.0
Commit: 2b1fb0ff4b49dc6f511dd7aa9996e1e103c223d7
Parents: 9d7b567
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Sat Nov 16 11:09:40 2013 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Sat Nov 16 11:09:40 2013 -0600

----------------------------------------------------------------------
 CHANGES.txt                                             | 1 +
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 6 ++++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b1fb0ff/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9ee6657..a438f15 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.12
+ * Invalidate row cache when dropping CF (CASSANDRA-6351)
  * add non-jamm path for cached statements (CASSANDRA-6293)
  * (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
  * Fix altering column types (CASSANDRA-6185)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b1fb0ff/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 39359b7..eaadbdd 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -297,6 +297,12 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
             SystemTable.removeTruncationRecord(metadata.cfId);
             data.unreferenceSSTables();
             indexManager.invalidate();
+
+            for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
+            {
+                if (key.cfId == metadata.cfId)
+                    invalidateCachedRow(key);
+            }
         }
         catch (Exception e)
         {


Mime
View raw message