ChenSammi commented on code in PR #8278:
URL: https://github.com/apache/ozone/pull/8278#discussion_r2044255192


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/MutableVolumeSet.java:
##########
@@ -475,7 +475,7 @@ public double getIdealUsage() {
     for (StorageVolume volume: volumeMap.values()) {
       SpaceUsageSource usage = volume.getCurrentUsage();
       totalCapacity += usage.getCapacity();
-      totalUsed += usage.getUsedSpace();
+      totalUsed += (usage.getCapacity() - usage.getAvailable());

Review Comment:
   We can change this to totalFree, and use "(totalCapacity - totalFree) /  
totalCapacity"  to save some computations. 



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