ChenSammi commented on code in PR #9575:
URL: https://github.com/apache/ozone/pull/9575#discussion_r2655139479
##########
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:
In DefaultContainerChoosingPolicy#chooseContainer, only CLOSED state
container is selected, QUASI_CLOSED container is used in test cases.
--
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]