DaveTeng0 commented on code in PR #3970:
URL: https://github.com/apache/ozone/pull/3970#discussion_r1024505035


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/RootEntityHandler.java:
##########
@@ -129,23 +130,10 @@ public QuotaUsageResponse getQuotaResponse()
     QuotaUsageResponse quotaUsageResponse = new QuotaUsageResponse();
     List<OmVolumeArgs> volumes = listVolumes();
     List<OmBucketInfo> buckets = listBucketsUnderVolume(null);
-    long quotaInBytes = 0L;
-    long quotaUsedInBytes = 0L;
 
-    for (OmVolumeArgs volume: volumes) {
-      final long quota = volume.getQuotaInBytes();
-      assert (quota >= -1L);
-      if (quota == -1L) {
-        // If one volume has unlimited quota, the "root" quota is unlimited.
-        quotaInBytes = -1L;
-        break;

Review Comment:
   The original way to calculate the disk capacity under 'root' will return -1, 
if any of the volume's quota is not set (means, 'unlimited' quota, default 
value is -1), which can't show the user what's the current available disk 
capacity from whole file system's perspective.



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