[
https://issues.apache.org/jira/browse/CASSANDRA-21288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Konstantinov updated CASSANDRA-21288:
--------------------------------------------
Attachment: CASSANDRA-21288_ci_summary.html
> 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
> Assignee: Dmitry Konstantinov
> Priority: Normal
> Fix For: 6.x
>
> Attachments: CASSANDRA-21288_ci_summary.html,
> LeafBTreeSearchIterator_metricRecording.png, image-2026-04-06-17-38-09-839.png
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> !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}
> the logic allocates org.apache.cassandra.db.rows.BTreeRow$CellIterator, with
> 2% of total allocations for the test shared in CASSANDRA-21285
> 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]