aweisberg commented on code in PR #3777:
URL: https://github.com/apache/cassandra/pull/3777#discussion_r1931242588
##########
src/java/org/apache/cassandra/service/reads/range/RangeCommandIterator.java:
##########
@@ -187,6 +193,47 @@ static int computeConcurrencyFactor(int totalRangeCount,
int rangesQueried, int
return concurrencyFactor;
}
+ private PartitionIterator executeAccord(ClusterMetadata cm,
PartitionRangeReadCommand rangeCommand, ConsistencyLevel cl)
+ {
+ //TODO (nicetohave):
https://issues.apache.org/jira/browse/CASSANDRA-20210 More efficient reads
across command stores
+ AsyncTxnResult result = StorageProxy.readWithAccord(cm, rangeCommand,
rangeCommand.dataRange().keyRange(), cl, requestTime);
+ return new AccordRangeResponse(result, rangeCommand.isReversed(), cl,
requestTime);
+ }
+
+ private SingleRangeResponse executeNormal(ReplicaPlan.ForRangeRead
replicaPlan, PartitionRangeReadCommand rangeCommand, ReadCoordinator
readCoordinator)
+ {
+ rangeCommand = (PartitionRangeReadCommand)
readCoordinator.maybeAllowOutOfRangeReads(rangeCommand,
replicaPlan.consistencyLevel());
+ // If enabled, request repaired data tracking info from full replicas,
but
+ // only if there are multiple full replicas to compare results from.
+ boolean trackRepairedStatus =
DatabaseDescriptor.getRepairedDataTrackingForRangeReadsEnabled()
+ &&
replicaPlan.contacts().filter(Replica::isFull).size() > 1;
+
+ ReplicaPlan.SharedForRangeRead sharedReplicaPlan =
ReplicaPlan.shared(replicaPlan);
+ ReadRepair<EndpointsForRange, ReplicaPlan.ForRangeRead> readRepair =
+ ReadRepair.create(readCoordinator, command, sharedReplicaPlan,
requestTime);
+ DataResolver<EndpointsForRange, ReplicaPlan.ForRangeRead> resolver =
+ new DataResolver<>(readCoordinator, rangeCommand, sharedReplicaPlan,
readRepair, requestTime, trackRepairedStatus);
+ ReadCallback<EndpointsForRange, ReplicaPlan.ForRangeRead> handler =
+ new ReadCallback<>(resolver, rangeCommand, sharedReplicaPlan,
requestTime);
+
+ if (replicaPlan.contacts().size() == 1 &&
replicaPlan.contacts().get(0).isSelf() && readCoordinator.localReadSupported())
Review Comment:
That part of the predicate exists in `trunk`
https://github.com/apache/cassandra/blob/8e5bdc6d4b1a3e5ffe0c930386153dc6408c0e4f/src/java/org/apache/cassandra/service/reads/range/RangeCommandIterator.java#L206
I'm not sure why a dedicated local read path needs to be created vs re-using
the one that already exists in `AbstractReadExecutor`.
--
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]