lokeshj1703 commented on a change in pull request #1401: HDDS-1561: Mark OPEN
containers as QUASI_CLOSED as part of Ratis groupRemove
URL: https://github.com/apache/hadoop/pull/1401#discussion_r321185076
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CloseContainerCommandHandler.java
##########
@@ -111,10 +111,13 @@ public void handle(SCMCommand command, OzoneContainer
ozoneContainer,
return;
}
// If we reach here, there is no active pipeline for this container.
- if (!closeCommand.getForce()) {
- // QUASI_CLOSE the container.
- controller.quasiCloseContainer(containerId);
- } else {
+ if (container.getContainerState() == ContainerProtos.ContainerDataProto
+ .State.OPEN || container.getContainerState() ==
+ ContainerProtos.ContainerDataProto.State.CLOSING) {
+ // Container should not exist in OPEN or CLOSING state without a
+ // pipeline.
+ controller.markContainerUnhealthy(containerId);
+ } else if (closeCommand.getForce()) {
// SCM told us to force close the container.
controller.closeContainer(containerId);
}
Review comment:
addressed in 2nd comit
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]