mirror of https://github.com/apache/cassandra
Invalidate key cache on table drop
patch by thobbs; reviewed by slebresne for CASSANDRA-6525
This commit is contained in:
parent
20e058b2bd
commit
ca213ccdc0
|
|
@ -47,6 +47,7 @@
|
|||
* Proper null handle for IF with map element access (CASSANDRA-7155)
|
||||
* Improve compaction visibility (CASSANDRA-7242)
|
||||
* Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
|
||||
* Invalid key cache entries on DROP (CASSANDRA-6525)
|
||||
Merged from 1.2:
|
||||
* Add Cloudstack snitch (CASSANDRA-7147)
|
||||
* Update system.peers correctly when relocating tokens (CASSANDRA-7126)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import org.cliffc.high_scale_lib.NonBlockingHashMap;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.cassandra.cache.KeyCacheKey;
|
||||
import org.apache.cassandra.cache.IRowCacheEntry;
|
||||
import org.apache.cassandra.cache.RowCacheKey;
|
||||
import org.apache.cassandra.cache.RowCacheSentinel;
|
||||
|
|
@ -339,6 +340,11 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
|
||||
if (key.cfId == metadata.cfId)
|
||||
invalidateCachedRow(key);
|
||||
|
||||
String ksname = keyspace.getName();
|
||||
for (KeyCacheKey key : CacheService.instance.keyCache.getKeySet())
|
||||
if (key.getPathInfo().left.equals(ksname) && key.getPathInfo().right.equals(name))
|
||||
CacheService.instance.keyCache.remove(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue