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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]