ChenSammi commented on code in PR #8360: URL: https://github.com/apache/ozone/pull/8360#discussion_r2078949959
########## hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerData.java: ########## @@ -214,21 +213,14 @@ public synchronized void setState(ContainerDataProto.State state) { (state != oldState)) { releaseCommitSpace(); } + } - /** - * commit space when container transitions (back) to Open. - * when? perhaps closing a container threw an exception - */ - if ((state == ContainerDataProto.State.OPEN) && - (state != oldState)) { - Preconditions.checkState(getMaxSize() > 0); - commitSpace(); - } + public boolean isCommittedSpace() { + return committedSpace; } - @VisibleForTesting - void setCommittedSpace(boolean committedSpace) { - this.committedSpace = committedSpace; + public void setCommittedSpace(boolean committed) { + committedSpace = committed; Review Comment: @peterxcli , I remember previous version has committed check to avoid commit twice. Is it removed? I believe that check is useful. -- 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