dcapwell commented on code in PR #3656:
URL: https://github.com/apache/cassandra/pull/3656#discussion_r1828420620


##########
src/java/org/apache/cassandra/service/accord/AccordConfigurationService.java:
##########
@@ -371,10 +378,11 @@ public synchronized void onNodesRemoved(long epoch, 
Topology current, Set<Node.I
         }
         listeners.forEach(l -> l.onRemoveNodes(epoch, removed));
 
+        if (service == null) return;
         for (Node.Id node : removed)
         {
             if (shareShard(current, node, localId))
-                AccordService.instance().tryMarkRemoved(current, node);
+                service.tryMarkRemoved(current, node);

Review Comment:
   > 4) when restarting and learning about removed nodes, AccordService is not 
setup yet, so need to pass this through to avoid startup issues
   
   restart is what needs this.  The `AccordTopologyMixupTest` was flakey in 
part due to this.
   
   The history needs to have a few in-flight epochs, then later on a node 
removal... with that history this triggered and would fail as 
`AccordService.instance()` is not set yet.
   
   We tried to set it up early but that then meant we could receive and process 
Accord work, which we should not do during startup



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

Reply via email to