Gargi-jais11 commented on code in PR #9575:
URL: https://github.com/apache/ozone/pull/9575#discussion_r2656832637


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -457,6 +457,18 @@ public BackgroundTaskResult call() {
         postCall(false, startTime);
         return BackgroundTaskResult.EmptyTaskResult.newResult();
       }
+
+      // Double check container state before acquiring lock to start move 
process.
+      // Container state may have changed after selection.
+      // Only CLOSED and QUASI_CLOSED containers can be moved.
+      State containerState = container.getContainerData().getState();
+      if (containerState != State.CLOSED && containerState != 
State.QUASI_CLOSED) {

Review Comment:
   Is this because in **Production** = only `CLOSED` (stable state). **Tests** 
= `CLOSED + QUASI_CLOSED` is to exercise edge cases as this keeps production 
safe while allowing thorough testing?



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