supratimdeka commented on a change in pull request #812: HDDS-1511. Space 
tracking for Open Containers in HDDS Volumes. Contributed by Supratim Deka
URL: https://github.com/apache/hadoop/pull/812#discussion_r283274385
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerData.java
 ##########
 @@ -280,6 +298,37 @@ public synchronized void closeContainer() {
     setState(ContainerDataProto.State.CLOSED);
   }
 
+  private void releaseCommitSpace() {
+    long unused = getMaxSize() - getBytesUsed();
+
+    // only if container size < max size
+    if (unused > 0 && committedSpace) {
+      getVolume().incCommittedBytes(0 - unused);
+    }
+    committedSpace = false;
+  }
+
+  public void commitSpace() {
 
 Review comment:
   will add in the next commit

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to