merge from 0.4 branch

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@824426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Ellis 2009-10-12 17:10:53 +00:00
parent 735435be69
commit f6b95bf0e5
3 changed files with 8 additions and 2 deletions

View File

@ -16,6 +16,7 @@
* Fix for discarding unneeded commitlog segments (CASSANDRA-459)
* Add SnapshotBeforeCompaction configuration option (CASSANDRA-426)
* Fix compaction abort under insufficient disk space (CASSANDRA-473)
* Fix reading subcolumn slice from tombstoned CF (CASSANDRA-484)
0.4.0

View File

@ -1080,7 +1080,7 @@ public final class ColumnFamilyStore implements ColumnFamilyStoreMBean
{
QueryFilter nameFilter = new NamesQueryFilter(filter.key, new QueryPath(columnFamily_), filter.path.superColumnName);
ColumnFamily cf = getColumnFamily(nameFilter);
if (cf == null)
if (cf == null || cf.getColumnCount() == 0)
return cf;
assert cf.getSortedColumns().size() == 1;

View File

@ -367,7 +367,7 @@ class TestMutations(CassandraTester):
_insert_simple()
_insert_super()
# Remove the key1:Standard1 cf:
# Remove the key1:Standard1 cf; verify super is unaffected
client.remove('Keyspace1', 'key1', ColumnPath('Standard1'), 3, ConsistencyLevel.ONE)
assert _big_slice('Keyspace1', 'key1', ColumnParent('Standard1')) == []
_verify_super()
@ -381,6 +381,11 @@ class TestMutations(CassandraTester):
assert _big_slice('Keyspace1', 'key1', ColumnParent('Standard1')) == \
[ColumnOrSuperColumn(column=Column('c1', 'value1', 4))]
# check removing the entire super cf, too.
client.remove('Keyspace1', 'key1', ColumnPath('Super1'), 3, ConsistencyLevel.ONE)
assert _big_slice('Keyspace1', 'key1', ColumnParent('Super1')) == []
assert _big_slice('Keyspace1', 'key1', ColumnParent('Super1', 'sc1')) == []
def test_super_cf_remove_column(self):
_insert_simple()