siddhantsangwan commented on code in PR #3535:
URL: https://github.com/apache/ozone/pull/3535#discussion_r909434267


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java:
##########
@@ -1066,6 +1062,12 @@ public void stop() {
             balancingThread.getId() != Thread.currentThread().getId()) {
       balancingThread.interrupt();
       try {
+        if (lock.isHeldByCurrentThread()) {
+          LOG.warn("Waiting for balancing thread \"{}\" to join while current" 
+
+                  " thread holds lock. This could result in a deadlock if" +
+                  " balancing thread is also waiting to acquire the lock.",
+              balancingThread.getName());

Review Comment:
   Done!



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