iamaleksey commented on code in PR #4106:
URL: https://github.com/apache/cassandra/pull/4106#discussion_r2068477322


##########
src/java/org/apache/cassandra/replication/Shard.java:
##########
@@ -94,6 +109,42 @@ void addSummaryForRange(AbstractBounds<PartitionPosition> 
range, boolean include
         });
     }
 
+    List<InetAddressAndPort> remoteReplicas()
+    {
+        List<InetAddressAndPort> replicas = new 
ArrayList<>(participants.size() - 1);
+        for (int i = 0, size = participants.size(); i < size; ++i)
+        {
+            int hostId = participants.get(i);
+            if (hostId != localHostId)
+                replicas.add(ClusterMetadata.current().directory.endpoint(new 
NodeId(hostId)));
+        }
+        return replicas;
+    }
+
+    /**
+     * Collects replicated offsets for the logs owned by this coordinator on 
this shard.
+     */
+    ShardReplicatedOffsets collectReplicatedOffsets()
+    {
+        Long2ObjectHashMap<LogReplicatedOffsets> offsets = new 
Long2ObjectHashMap<>();
+        for (CoordinatorLogPrimary log : primaryLogs())

Review Comment:
   You could just have everyone broadcast everything, but *I think* you do want 
to centralise the reconcile part to be done by just one replica: to pull all 
the missing mutations for the log that are present on other live replicas, then 
send the ones that other replicas don't have to all who need them, reaching 
full parity (in absence of new writes from the unreachable coordinator). And if 
you do that, you might as well have that deputy replica to also be responsible 
for offset broadcasting for the log it's deputising. This was my thinking, 
anyway.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to