symious commented on a change in pull request #3129:
URL: https://github.com/apache/ozone/pull/3129#discussion_r813592598



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java
##########
@@ -417,24 +425,32 @@ private IterationResult doIteration() {
           findSourceStrategy.removeCandidateSourceDataNode(source);
         }
       }
-
-      if (!isMoveGenerated) {
-        //no move option is generated, so the cluster can not be
-        //balanced any more, just stop iteration and exit
-        return IterationResult.CAN_NOT_BALANCE_ANY_MORE;
-      }
-      return IterationResult.ITERATION_COMPLETED;
     } finally {
-      checkIterationMoveResults(selectedTargets);

Review comment:
       I agree, the ITERATION_RESULT is a little confused here. It's now 
referring to the 
   1. reason for stop generating moves (MAX_SIZE_TO_MOVE_REACHED)
   2. the result of inner iteration (ITERATION_COMPLETED)
   3. the reason we should stop the whole balancer service 
(CAN_NOT_BALANCE_ANY_MORE)
   
   Maybe we should sort out the process and refactor the code.




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