sumitagrawl commented on code in PR #3782:
URL: https://github.com/apache/ozone/pull/3782#discussion_r990446415
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java:
##########
@@ -1092,33 +315,24 @@ public void stop() {
Thread balancingThread;
lock.lock();
try {
- if (!isBalancerRunning()) {
- LOG.warn("Cannot stop Container Balancer because it's not running");
+ if (!canBalancerStop()) {
+ LOG.warn("Cannot stop Container Balancer because it's not running or "
+
+ "stopping");
return;
}
+ task.stop();
balancingThread = currentBalancingThread;
Review Comment:
Fixed one issue related to state sync when set to stopped and stoping. Need
a temp variable as state can change outside the lock.
--
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]