belliottsmith commented on code in PR #3781:
URL: https://github.com/apache/cassandra/pull/3781#discussion_r1908437945
##########
src/java/org/apache/cassandra/service/accord/AccordSyncPropagator.java:
##########
@@ -232,25 +232,22 @@ public String toString()
'}';
}
- public synchronized void onNodesRemoved(Set<Node.Id> removed)
+ public synchronized void onNodesRemoved(Node.Id removed)
{
- for (Node.Id node : removed)
+ PendingEpochs pendingEpochs = pending.get(removed.id);
+ if (pendingEpochs == null) return;
+ long[] toComplete = new long[pendingEpochs.size()];
+ Long2ObjectHashMap<PendingEpoch>.KeyIterator it =
pendingEpochs.keySet().iterator();
+ for (int i = 0; it.hasNext(); i++)
+ toComplete[i] = it.nextLong();
+ Arrays.sort(toComplete);
+ for (long epoch : toComplete)
+ listener.onEndpointAck(removed, epoch);
Review Comment:
might be nice to move this and the below listener notifications outside of
the synchronised block?
--
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]