HDDS-327. CloseContainer command handler should not throw exception if the container is already closed. Contributed by Shashikant Banerjee.

This commit is contained in:
Hanisha Koneru 2018-08-10 11:43:22 -07:00
parent 398d895543
commit a28624d2a4
1 changed files with 2 additions and 2 deletions

View File

@ -387,8 +387,8 @@ public class KeyValueHandler extends Handler {
try { try {
if (containerState == ContainerLifeCycleState.CLOSED) { if (containerState == ContainerLifeCycleState.CLOSED) {
throw new StorageContainerException("Container already closed. " + LOG.debug("Container {} is already closed.", containerID);
"ContainerID: " + containerID, CLOSED_CONTAINER_RETRY); return ContainerUtils.getSuccessResponse(request);
} else if (containerState == ContainerLifeCycleState.INVALID) { } else if (containerState == ContainerLifeCycleState.INVALID) {
LOG.debug("Invalid container data. ContainerID: {}", containerID); LOG.debug("Invalid container data. ContainerID: {}", containerID);
throw new StorageContainerException("Invalid container data. " + throw new StorageContainerException("Invalid container data. " +