Dmitry Konstantinov created CASSANDRA-21288:
-----------------------------------------------
Summary: Avoid Cell iterator for alive rows in
withMetricsRecording transformation of ReadCommand
Key: CASSANDRA-21288
URL: https://issues.apache.org/jira/browse/CASSANDRA-21288
Project: Apache Cassandra
Issue Type: Improvement
Components: Local/Other
Reporter: Dmitry Konstantinov
Attachments: image-2026-04-06-17-38-09-839.png
!image-2026-04-06-17-38-09-839.png|width=600!
for every selected row we iterate over cells to check if they have have any
tombstones:
{code}
@Override
public Row applyToRow(Row row)
{
boolean hasTombstones = false;
for (Cell<?> cell : row.cells())
{
if (!cell.isLive(ReadCommand.this.nowInSec()))
{
countTombstone(row.clustering());
hasTombstones = true; // allows to avoid counting an
extra tombstone if the whole row expired
}
}
{code}
we can skip the iteration by checking
row.hasDeletion(ReadCommand.this.nowInSec()) first
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]