aratno commented on code in PR #4428:
URL: https://github.com/apache/cassandra/pull/4428#discussion_r2539740044
##########
src/java/org/apache/cassandra/db/ReadExecutionController.java:
##########
@@ -243,4 +261,27 @@ private void addSample()
if (cfs != null)
cfs.metric.topLocalReadQueryTime.addSample(cql, timeMicros);
}
+
+ public void addActivationIds(ColumnFamilyStore.ViewFragment view)
+ {
+ Preconditions.checkState(metadata().replicationType().isTracked());
+ if (activationIds == null)
+ activationIds = new HashSet<>();
+ for (SSTableReader sstable : view.sstables)
+ {
+ ActivatedTransfers transfers =
sstable.getCoordinatorLogOffsets().transfers();
+ if (transfers.isEmpty())
+ continue;
+ logger.trace("Adding overlapping IDs to read keyRange {}",
command.dataRange.keyRange);
+ transfers.forEachIntersecting(command.dataRange.keyRange, id -> {
+ logger.debug("Adding overlapping activation ID {}", id);
+ activationIds.add(id);
+ });
+ }
+ }
+
+ public Iterator<ShortMutationId> getActivationIds()
+ {
+ return activationIds == null ? null : activationIds.iterator();
Review Comment:
It's fine to have tracked reads with no intersecting transfers, so we
shouldn't explode on unset
--
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]