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 2022/03/14 06:11:30 UTC
[GitHub] [ozone] siddhantsangwan commented on a change in pull request #3153: HDDS-6397. Implement ContainerBalancer as an SCMService
siddhantsangwan commented on a change in pull request #3153:
URL: https://github.com/apache/ozone/pull/3153#discussion_r825617684
##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java
##########
@@ -740,14 +708,126 @@ private void incSizeSelectedForMoving(DatanodeDetails source,
findTargetStrategy.increaseSizeEntering(target, size);
}
+ /**
+ * Receives a notification for raft or safe mode related status changes.
+ * Stops ContainerBalancer if it's running and the current SCM becomes a
+ * follower or is in safe mode.
+ */
+ @Override
+ public void notifyStatusChanged() {
+ if (!checkLeaderAndSafeMode()) {
Review comment:
I've added the checks to make it explicit that we need to stop balancer only if there's a status change to follower or safe mode and balancer is running.
--
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