merge from 1.2

This commit is contained in:
Jonathan Ellis 2013-05-09 17:41:41 -05:00
commit 156fb112dc
4 changed files with 9 additions and 3 deletions

View File

@ -45,6 +45,7 @@
1.2.5
* fix 2i updates with indentical values and timestamps (CASSANDRA-5540)
* fix compaction throttling bursty-ness (CASSANDRA-4316)
* reduce memory consumption of IndexSummary (CASSANDRA-5506)
* remove per-row column name bloom filters (CASSANDRA-5492)

View File

@ -209,7 +209,7 @@ public class LazilyCompactedRow extends AbstractCompactedRow implements Iterable
container.addColumn(column);
if (indexer != SecondaryIndexManager.nullUpdater
&& !column.isMarkedForDelete()
&& container.getColumn(column.name()) != column)
&& !container.getColumn(column.name()).equals(column))
{
indexer.remove(column);
}

View File

@ -134,7 +134,7 @@ public class PrecompactedRow extends AbstractCompactedRow
container.addColumn(column);
if (indexer != SecondaryIndexManager.nullUpdater
&& !column.isMarkedForDelete()
&& container.getColumn(column.name()) != column)
&& !container.getColumn(column.name()).equals(column))
{
indexer.remove(column);
}

View File

@ -596,13 +596,18 @@ public class SecondaryIndexManager
public void update(Column oldColumn, Column column)
{
if (oldColumn.equals(column))
return;
for (SecondaryIndex index : indexFor(column.name()))
{
if (index instanceof PerColumnSecondaryIndex)
{
((PerColumnSecondaryIndex) index).delete(key.key, oldColumn);
// insert the new value before removing the old one, so we never have a period
// where the row is invisible to both queries (the opposite seems preferable); see CASSANDRA-5540
if (!column.isMarkedForDelete())
((PerColumnSecondaryIndex) index).insert(key.key, column);
((PerColumnSecondaryIndex) index).delete(key.key, oldColumn);
}
}
}