From 6dcf3e56c8aa4e9e5ba4ff4341a041dfc2bffed3 Mon Sep 17 00:00:00 2001 From: Blake Eggleston Date: Thu, 18 Jun 2026 14:19:27 -0700 Subject: [PATCH] feedback --- .../locator/SatelliteReplicationStrategy.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/java/org/apache/cassandra/locator/SatelliteReplicationStrategy.java b/src/java/org/apache/cassandra/locator/SatelliteReplicationStrategy.java index fb6aec9d8e..ccb749a42d 100644 --- a/src/java/org/apache/cassandra/locator/SatelliteReplicationStrategy.java +++ b/src/java/org/apache/cassandra/locator/SatelliteReplicationStrategy.java @@ -587,7 +587,6 @@ public class SatelliteReplicationStrategy extends AbstractReplicationStrategy // Paxos consensus operates entirely within the primary DC Predicate inPrimaryDC = rp -> metadata.locator.location(rp.endpoint()).datacenter.equals(primaryDC); ReplicaLayout.ForTokenWrite primaryAll = fullLayout.filter(inPrimaryDC); - ReplicaLayout.ForTokenWrite primaryElectorate = primaryAll; // Satellite/secondary DC endpoints for reads during prepare and writes during commit. // Only include the primary DC's satellite and other full DCs — not satellites of other DCs. @@ -604,14 +603,13 @@ public class SatelliteReplicationStrategy extends AbstractReplicationStrategy EndpointsForToken live = fullLayout.all().filter(isReplicaAlive); - Token actualToken = token; return new SatellitePaxosParticipants(metadata.epoch, Keyspace.open(table.keyspace), consistencyForConsensus, primaryAll, - primaryElectorate, + primaryAll, // DC filtering happens earlier live, - (cm) -> Paxos.Participants.get(cm, table, actualToken, consistencyForConsensus), + (cm) -> Paxos.Participants.get(cm, table, token, consistencyForConsensus), satelliteEndpoints); } @@ -694,7 +692,7 @@ public class SatelliteReplicationStrategy extends AbstractReplicationStrategy for (String dc : strategy.fullDCs.keySet()) { - if (dc.equals(primary) || dc.equals(satellite) || strategy.disabledDCs.contains(dc)) + if (dc.equals(primary) || strategy.disabledDCs.contains(dc)) continue; results.add(dc); } @@ -774,9 +772,7 @@ public class SatelliteReplicationStrategy extends AbstractReplicationStrategy super(metadata, keyspace, cl, strategy, primary, fullLayout); this.selector = selector; if (ADDL_CHECKS_ENABLED) - { Preconditions.checkState(!strategy.disabledDCs.contains(primary)); - } } @Override