소스 검색

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

Hanisha Koneru 7 년 전
부모
커밋
a28624d2a4
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java

+ 2 - 2
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java

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