ChenSammi commented on code in PR #8360:
URL: https://github.com/apache/ozone/pull/8360#discussion_r2076885921


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -434,8 +435,12 @@ ContainerCommandResponseProto handleCreateContainer(
         LOG.debug("Container already exists. container Id {}", containerID);
       }
     } catch (StorageContainerException ex) {
+      exceptionThrown = true;
       return ContainerUtils.logAndReturnError(LOG, ex, request);
     } finally {
+      if (exceptionThrown) {

Review Comment:
   1.  please move this newContainerData.releaseCommitSpace() into the 
exception handling directly. 
   2. we might first check whether space is committed before release, for 
newContainer.create can throw out exception from 
volumeChoosingPolicy.chooseVolume  too. 



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to