GlenGeng commented on pull request #1893: URL: https://github.com/apache/ozone/pull/1893#issuecomment-775094440
> The changes look good. @GlenGeng , is there a race condition where, replicationManager can go from stop to start state bcoz of leader election and admin command execution concurrently? There will be no race condition here. start/stop RM and becoming leader/step down are two different conditions protected by two locks. stop/start ReplicationManager will kill/create the thread which are all synchronized methods of ReplicationManager, meanwhile becoming leader or step down will call notifyStatusChanged() to change `serviceStatus`, and this modification is protected by the `serviceLock`. When the thread of ReplicationManager is running, it call `shouldRun()` to decide if it should take effect or skip, and `shouldRun()` need lock `serviceLock`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
