Author: jbellis Date: Mon Dec 12 20:31:13 2011 New Revision: 1213423 URL: http://svn.apache.org/viewvc?rev=1213423&view=rev Log: fix assertion when dropping a columnfamily with no sstables patch by jbellis; reviewed by slebresne and tested by Andrew Suffield for CASSANDRA-3614
Modified: cassandra/branches/cassandra-1.0/CHANGES.txt cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/DataTracker.java Modified: cassandra/branches/cassandra-1.0/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/CHANGES.txt?rev=1213423&r1=1213422&r2=1213423&view=diff ============================================================================== --- cassandra/branches/cassandra-1.0/CHANGES.txt (original) +++ cassandra/branches/cassandra-1.0/CHANGES.txt Mon Dec 12 20:31:13 2011 @@ -1,3 +1,7 @@ +1.0.7 + * fix assertion when dropping a columnfamily with no sstables (CASSANDRA-3614) + + 1.0.6 * (CQL) fix cqlsh support for replicate_on_write (CASSANDRA-3596) * fix adding to leveled manifest after streaming (CASSANDRA-3536) Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/DataTracker.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/DataTracker.java?rev=1213423&r1=1213422&r2=1213423&view=diff ============================================================================== --- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/DataTracker.java (original) +++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/DataTracker.java Mon Dec 12 20:31:13 2011 @@ -253,6 +253,12 @@ public class DataTracker public void removeAllSSTables() { List<SSTableReader> sstables = getSSTables(); + if (sstables.isEmpty()) + { + // notifySSTablesChanged -> LeveledManifest.promote doesn't like a no-op "promotion" + return; + } + replace(sstables, Collections.<SSTableReader>emptyList()); notifySSTablesChanged(sstables, Collections.<SSTableReader>emptyList()); }