ivandika3 commented on code in PR #6481:
URL: https://github.com/apache/ozone/pull/6481#discussion_r1552667175


##########
hadoop-ozone/dist/src/main/smoketest/balancer/testBalancer.robot:
##########
@@ -95,15 +95,16 @@ Get Uuid
 Close All Containers
     FOR     ${INDEX}    IN RANGE    15
         ${container} =      Execute          ozone admin container list 
--state OPEN | jq -r 'select(.replicationConfig.replicationFactor == "THREE") | 
.containerID' | head -1
-        EXIT FOR LOOP IF    "${container}" == ""
-                            Execute          ozone admin container close 
"${container}"
+        EXIT FOR LOOP IF    "${container}" == "${EMPTY}"
+                            ${message} =    Execute And Ignore Error    ozone 
admin container close "${container}"
+                            Run Keyword If    '${message}' != '${EMPTY}'      
Should Contain   ${message}   is in closing state
         ${output} =         Execute          ozone admin container info 
"${container}"
                             Should contain   ${output}   CLOS
     END
     Wait until keyword succeeds    3min    10sec    All container is closed
 
 All container is closed
-    ${output} =         Execute          ozone admin container list --state 
OPEN
+    ${output} =         Execute           ozone admin container list --state 
OPEN
                         Should Be Empty   ${output}

Review Comment:
   From `ContainerBalancerSelectionCriteria#shouldBeExcluded`, the container 
chosen needs to be CLOSED (`ContainerBalancerCriteria#isContainerClosed`). The 
"All container is closed" check whether there is no OPEN containers. Therefore, 
I think there is a chance where the container is still `CLOSING` when the 
container balancer start, and the container will be excluded during the 
container balancer iteration.
   
   However, I think the chance is very small, since the time pass between the 
close container command and the start of the container balancer should be large 
enough for the container to be closed. So it should be fine as it is now.



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