ChenSammi commented on code in PR #8360:
URL: https://github.com/apache/ozone/pull/8360#discussion_r2074873613
##########
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:
Right. We should set commitedSpace asap. For example, right after L176 that
volume is set.
As for the commitSpace release, it would be better we do that in
KeyValueHandler#handleCreateContainer
so it will cover the failure case caused by containerSet.addContainer 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: [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]