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_r283274169
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerData.java
##########
@@ -321,10 +370,20 @@ public long getWriteBytes() {
/**
* Increase the number of bytes write into the container.
+ * Also decrement committed bytes against the bytes written.
* @param bytes the number of bytes write into the container.
*/
public void incrWriteBytes(long bytes) {
+ long unused = getMaxSize() - getBytesUsed();
Review comment:
there is no requirement for decrWriteBytes currently in any flow.
But I have added a new method decCommittedBytes(delta) in HddsVolume to
complement incCommittedBytes(delta). This improves readability and the caller
does not have to do a (0 - delta) to decrease commit space.
----------------------------------------------------------------
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]