sodonnel commented on code in PR #6179:
URL: https://github.com/apache/ozone/pull/6179#discussion_r1479634851
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java:
##########
@@ -342,10 +342,13 @@ private static void blockTillTaskStop(Thread
balancingThread) {
// NOTE: join should be called outside the lock in hierarchy
// to avoid locking others waiting
// wait for balancingThread to die with interrupt
- balancingThread.interrupt();
LOG.info("Container Balancer waiting for {} to stop", balancingThread);
try {
- balancingThread.join();
+ while (balancingThread.isAlive()) {
Review Comment:
When you interrupt the thread, as soon as it hits the Thread.sleep call, it
should throw an interrupted exception and exit, so this retry logic should not
be needed. I suspect there is some other bug in the interrupt handling that is
causing this problem and we should try to get to the bottom of that.
--
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]