Mark Gui created HDDS-5316:
------------------------------

             Summary: Fix datanode reserved space calculation
                 Key: HDDS-5316
                 URL: https://issues.apache.org/jira/browse/HDDS-5316
             Project: Apache Ozone
          Issue Type: Sub-task
            Reporter: Mark Gui
            Assignee: Mark Gui


Here we found a bad case with datanode reserved space:

Say we have 1TB volume and 500GB reserved space configed, e.g. /data1:500GB.

So we intend to reserve this 500GB to another app, e.g. yarn, then yarn 
consumed all 500GB.

Then we found that the available space of ozone is 0, which is not intended.

The root cause is the following piece:

 
{code:java}
// VolumeInfo.java
public long getAvailable() {
 return Math.max(usage.getAvailable() - reservedInBytes, 0);
}
...
// VolumeUsage.java
public long getAvailable() {
  long l = source.getCapacity() - source.getUsedSpace();
  return Math.max(Math.min(l, source.getAvailable()), 0);
}{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to