arp7 commented on a change in pull request #620: HDDS-1205. Refactor
ReplicationManager to handle QUASI_CLOSED contain…
URL: https://github.com/apache/hadoop/pull/620#discussion_r267578782
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -192,24 +193,19 @@ public void stop() {
* ReplicationMonitor thread runnable. This wakes up at configured
* interval and processes all the containers in the system.
*/
- private void run() {
+ private synchronized void run() {
Review comment:
Don't make the method synchronized. If so then anyone who invokes
processContainersNow will block indefinitely while the whole iteration
completes. Instead just wrap the _wait(interval)_ inside a _synchronized(this)_
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]