beobal commented on code in PR #3197:
URL: https://github.com/apache/cassandra/pull/3197#discussion_r1559661763
##########
src/java/org/apache/cassandra/locator/ReplicaLayout.java:
##########
@@ -383,17 +383,32 @@ static ReplicaLayout.ForRangeRead
forRangeReadLiveSorted(ClusterMetadata metadat
static EndpointsForRange forNonLocalStategyRangeRead(ClusterMetadata
metadata, KeyspaceMetadata keyspace, AbstractBounds<PartitionPosition> range)
{
- return
metadata.placements.get(keyspace.params.replication).reads.forRange(range.right.getToken()).get();
+ // MetaStrategy distributes the entire keyspace to all replicas. In
addition, its tables (currently only
+ // the dist log table) don't use the globally configured partitioner.
For these reasons we don't lookup the
+ // replicas using the supplied token as this can actually be of the
incorrect type (for example when
+ // performing Paxos repair).
+ Token searchToken = keyspace.params.replication.isMeta() ?
MetaStrategy.entireRange.right : range.right.getToken();
Review Comment:
Like you say, paxos repair (and to an extent paxos in general) is
complicated by the fact that the keys and ranges in the system paxos tables
actually represent keys in the tables which are the subjects of the paxos
transactions, but now these may be using different partitioners.
This special casing *did* turn out to not be entirely necessary though (it
was a bit of a remnant from earlier on in development). I've reworked it in
43ba1cd83833bde270ea949016556baa635d6bf9
--
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]