You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Mark Gui (Jira)" <ji...@apache.org> on 2021/06/08 01:59:00 UTC

[jira] [Created] (HDDS-5316) Fix datanode reserved space calculation

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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org