Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/java/org/apache/cassandra/db/ReadCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,15 @@ public Row applyToStatic(Row row)
public Row applyToRow(Row row)
{
boolean hasTombstones = false;
for (Cell<?> cell : row.cells())
if (row.hasDeletion(ReadCommand.this.nowInSec())) // perf optimization, to avoid iteration if all cells are alive
{
if (!cell.isLive(ReadCommand.this.nowInSec()))
for (Cell<?> cell : row.cells())
{
countTombstone(row.clustering());
hasTombstones = true; // allows to avoid counting an extra tombstone if the whole row expired
if (!cell.isLive(ReadCommand.this.nowInSec()))
{
countTombstone(row.clustering());
hasTombstones = true; // allows to avoid counting an extra tombstone if the whole row expired
}
}
}

Expand Down