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


##########
src/java/org/apache/cassandra/service/accord/AccordConfigurationService.java:
##########
@@ -325,7 +325,7 @@ private void reportMetadata(ClusterMetadata metadata)
         Stage.MISC.submit(() -> reportMetadataInternal(metadata));
     }
 
-    synchronized void reportMetadataInternal(ClusterMetadata metadata)
+    void reportMetadataInternal(ClusterMetadata metadata)

Review Comment:
   this is called from 2 places: startup, TCM notification.  On TCM 
notification we are on `MiscStage` which is single threaded, so the sync isn't 
buying us anything there.
   
   On startup, there are 2 different code paths: before TCM listen, after.
   
   1) before we register with TCM the caller is the main thread, so no 
concurrency here. Sync doesn't buy us much
   2) after register with TCM we check if there is a epoch gap between what we 
*think* the latest is and what TCM thinks.  If there is a gap *we* need to 
resolve it (else accord knows epochs [5, 6, 10])... In this case 
`reportTopology` is safe to call in any order, so is `onNodesRemoved`, so that 
really boils down to `updateMapping` which is already getting called in 
different orders *and* also syncs...
   
   
   TL;DR - Yes, I think it's safe to drop here.  Ill try to think through this 
more to help confirm



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