ChenSammi commented on code in PR #7927:
URL: https://github.com/apache/ozone/pull/7927#discussion_r1961174086
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java:
##########
@@ -69,13 +69,11 @@ SpaceUsageSource realUsage() {
* <pre>
* {@code
* Calculate available space use method B.
- * |----used----| (avail) |++++++++reserved++++++++|
- * | fsAvail |-------other-------|
- * ->|~~~~|<-
- * remainingReserved
+ * |----used----| fsAvail |---other---|
+ * |----used----| (avail) |+++reserved+++|---other---|
* }
* </pre>
- * B) avail = fsAvail - Max(reserved - other, 0);
+ * B) avail = fsAvail - Max(reserved, 0);
Review Comment:
@symious , it's a good idea. The change looks good to me. Is there any
chance that "reserved" is a negative value? If not, then here we can just use
"fsAvail - reserved".
--
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]