You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "dcapwell (via GitHub)" <gi...@apache.org> on 2024/08/02 19:16:53 UTC
Re: [PR] CASSANDRA-19321 Accord: Command to mark replicas as “stale" for decommission [cassandra-accord]
dcapwell commented on code in PR #108:
URL: https://github.com/apache/cassandra-accord/pull/108#discussion_r1702230147
##########
accord-core/src/main/java/accord/topology/Topologies.java:
##########
@@ -64,6 +64,11 @@ default boolean isEmpty()
Set<Node.Id> nodes();
+ default Set<Node.Id> nonStaleNodes()
+ {
+ throw new UnsupportedOperationException();
Review Comment:
why? this can't be accepted for any impl so by not defining it makes it clear to know where to add; no?
##########
accord-core/src/main/java/accord/topology/Topologies.java:
##########
@@ -64,6 +64,11 @@ default boolean isEmpty()
Set<Node.Id> nodes();
+ default Set<Node.Id> nonStaleNodes()
+ {
+ throw new UnsupportedOperationException();
Review Comment:
if you want to block in `Multi` then we should be more explicit about that... and the callers of this should enforce we don't have multi (which is allowed for RX transactions)
##########
accord-core/src/main/java/accord/topology/Topology.java:
##########
@@ -60,8 +61,10 @@ public class Topology
{
public static final long EMPTY_EPOCH = 0;
private static final int[] EMPTY_SUBSET = new int[0];
- public static final Topology EMPTY = new Topology(null, EMPTY_EPOCH, new Shard[0], Ranges.EMPTY, Collections.emptyMap(), Ranges.EMPTY, EMPTY_SUBSET);
+ public static final Topology EMPTY = new Topology(null, EMPTY_EPOCH, Collections.emptySet(), new Shard[0], Ranges.EMPTY, Collections.emptyMap(), Ranges.EMPTY, EMPTY_SUBSET);
+
final long epoch;
+ final Set<Id> staleIds;
Review Comment:
to keep the pattern shouldn't this be in `Shard`? In C* we cache things, so we won't have a ton of duplicates.
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org