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


##########
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() {

Review Comment:
   I'm not sure we really need @VisibleForTesting here, as it's just a getter, 
it won't affect anything if used in prod code.



-- 
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]

Reply via email to