bdeggleston commented on code in PR #4708:
URL: https://github.com/apache/cassandra/pull/4708#discussion_r3562158308


##########
src/java/org/apache/cassandra/service/paxos/Paxos.java:
##########
@@ -464,26 +462,15 @@ public void collectFailure(InetAddressAndPort 
inetAddressAndPort, RequestFailure
 
         }
 
-        static Participants get(ClusterMetadata metadata, TableMetadata table, 
Token token, ConsistencyLevel consistencyForConsensus)
+        public static Participants get(ClusterMetadata metadata, TableMetadata 
table, Token token, ConsistencyLevel consistencyForConsensus)
         {
             return get(metadata, table, token, consistencyForConsensus, 
FailureDetector.isReplicaAlive);
         }
 
         static Participants get(ClusterMetadata metadata, TableMetadata table, 
Token token, ConsistencyLevel consistencyForConsensus, Predicate<Replica> 
isReplicaAlive)
         {
-            KeyspaceMetadata keyspaceMetadata = 
metadata.schema.getKeyspaceMetadata(table.keyspace);
-            // 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).
-            final Token actualToken = table.partitioner == 
MetaStrategy.partitioner ? MetaStrategy.entireRange.right : token;
-            ReplicaLayout.ForTokenWrite all = 
forTokenWriteLiveAndDown(keyspaceMetadata, actualToken);
-            ReplicaLayout.ForTokenWrite electorate = 
consistencyForConsensus.isDatacenterLocal()
-                                                     ? 
all.filter(InOurDc.replicas()) : all;
-
-            EndpointsForToken live = all.all().filter(isReplicaAlive);
-            return new Participants(metadata.epoch, 
Keyspace.open(table.keyspace), consistencyForConsensus, all, electorate, live,
-                                    (cm) -> get(cm, table, actualToken, 
consistencyForConsensus));
+            AbstractReplicationStrategy strategy = 
Keyspace.open(table.keyspace).getReplicationStrategy();

Review Comment:
   yes, good catch!



-- 
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]

Reply via email to