You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/09/02 08:27:03 UTC
[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2578: HDDS-5671. ContainerBalancer#stop should prevent the current balancing thread from interrupting itself.
JacksonYao287 commented on a change in pull request #2578:
URL: https://github.com/apache/ozone/pull/2578#discussion_r700865242
##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java
##########
@@ -722,8 +722,10 @@ public void stop() {
return;
}
balancerRunning = false;
- currentBalancingThread.interrupt();
- currentBalancingThread.join(1000);
+ if (Thread.currentThread().getId() != currentBalancingThread.getId()) {
+ currentBalancingThread.interrupt();
+ currentBalancingThread.join(100);
Review comment:
to make it simple , maybe we can use the deprecated method `thread.stop()`. but this looks not graceful....
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org