You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "netudima (via GitHub)" <gi...@apache.org> on 2026/05/15 10:31:53 UTC
[PR] [CASSANDRA-21363][trunk]BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones [cassandra]
netudima opened a new pull request, #4811:
URL: https://github.com/apache/cassandra/pull/4811
patch by Dmitry Konstantinov; reviewed by TBD for CASSANDRA-21363
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] [CASSANDRA-21363][trunk]BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones [cassandra]
Posted by "netudima (via GitHub)" <gi...@apache.org>.
netudima closed pull request #4811: [CASSANDRA-21363][trunk]BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones
URL: https://github.com/apache/cassandra/pull/4811
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] [CASSANDRA-21363][trunk]BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones [cassandra]
Posted by "frankgh (via GitHub)" <gi...@apache.org>.
frankgh commented on code in PR #4811:
URL: https://github.com/apache/cassandra/pull/4811#discussion_r3277800162
##########
src/java/org/apache/cassandra/db/rows/BTreeRow.java:
##########
@@ -198,6 +199,20 @@ private static long minDeletionTime(ColumnData cd)
return cd.column().isSimple() ? minDeletionTime((Cell<?>) cd) : minDeletionTime((ComplexColumnData)cd);
}
+ @Override
+ public boolean hasLiveData(long nowInSec, boolean enforceStrictLiveness)
+ {
+ if (primaryKeyLivenessInfo().isLive(nowInSec))
+ return true;
+ else if (enforceStrictLiveness)
+ return false;
+ // Fast path to avoid cell iteration
+ // if there are no deleted cells then we can just check if we have at least one cell
+ if (!hasDeletion(nowInSec))
+ return !BTree.isEmpty(btree);
Review Comment:
would it be possible to come up with a test that touches this new code path?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] [CASSANDRA-21363][trunk]BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones [cassandra]
Posted by "netudima (via GitHub)" <gi...@apache.org>.
netudima commented on PR #4811:
URL: https://github.com/apache/cassandra/pull/4811#issuecomment-4545366521
Merged as https://github.com/apache/cassandra/commit/bf711a0fc1b116ba46a1a203a2da360cabede947
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org