Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merge from 1.2

  • Loading branch information...
commit 156fb112dc37470614e01c037e797e83afda93d8 2 parents ce6429d + 95cf9a5
@jbellis jbellis authored
View
1  CHANGES.txt
@@ -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
2  src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -209,7 +209,7 @@ public void reduce(OnDiskAtom current)
container.addColumn(column);
if (indexer != SecondaryIndexManager.nullUpdater
&& !column.isMarkedForDelete()
- && container.getColumn(column.name()) != column)
+ && !container.getColumn(column.name()).equals(column))
{
indexer.remove(column);
}
View
2  src/java/org/apache/cassandra/db/compaction/PrecompactedRow.java
@@ -134,7 +134,7 @@ public void reduce(Column column)
container.addColumn(column);
if (indexer != SecondaryIndexManager.nullUpdater
&& !column.isMarkedForDelete()
- && container.getColumn(column.name()) != column)
+ && !container.getColumn(column.name()).equals(column))
{
indexer.remove(column);
}
View
7 src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -596,13 +596,18 @@ public void insert(Column column)
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);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.