siddhantsangwan commented on code in PR #8360:
URL: https://github.com/apache/ozone/pull/8360#discussion_r2072854320
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -236,6 +243,10 @@ public void create(VolumeSet volumeSet,
VolumeChoosingPolicy
"Failed to create " + containerData + " on all volumes: " +
volumeSet.getVolumesList(),
ex, CONTAINER_INTERNAL_ERROR);
}
+ } finally {
+ if (exceptionThrown) {
+ containerData.releaseCommitSpace();
+ }
Review Comment:
One thing to tighten up is that `releaseCommitSpace` will only release space
if `containerData.setCommittedSpace(true);` has set `committedSpace` to true
before. But it's possible that an exception is thrown before the call to
`containerData.setCommittedSpace(true);`. In that case the committed space
won't be released.
--
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]