belliottsmith commented on code in PR #3938:
URL: https://github.com/apache/cassandra/pull/3938#discussion_r1977315314


##########
src/java/org/apache/cassandra/service/accord/AccordConfigurationService.java:
##########
@@ -547,14 +488,15 @@ protected void localSyncComplete(Topology topology, 
boolean startSync)
         if (!startSync || epochState.syncStatus != SyncStatus.NOT_STARTED)
             return;
 
-        Set<Node.Id> notify = topology.nodes().stream().filter(i -> 
!localId.equals(i)).collect(Collectors.toSet());
         synchronized (this)
         {
             if (epochState.syncStatus != SyncStatus.NOT_STARTED)
                 return;
-            diskState = diskStateManager.setNotifyingLocalSync(epoch, notify, 
diskState);
+            diskStateManager.setNotifyingLocalSync(epoch);
             epochState.setSyncStatus(SyncStatus.NOTIFYING);
         }
+
+        Set<Node.Id> notify = topology.nodes().stream().filter(i -> 
!localId.equals(i)).collect(Collectors.toSet());

Review Comment:
   maybe just create the Set with all entries and remove the one we don't want. 
If we build on my new patch, we can use SortedArraySet to build this usually 
for almost free, and can even introduce a SortedArraySet.all(SortedArrayList) 
method that will build a new one with the entries in topology.nodes() extremely 
cheaply.



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