mingchao zhao created HDDS-4631:
-----------------------------------

             Summary: Fixed client set quota with 0
                 Key: HDDS-4631
                 URL: https://issues.apache.org/jira/browse/HDDS-4631
             Project: Hadoop Distributed Data Store
          Issue Type: Sub-task
            Reporter: mingchao zhao
            Assignee: mingchao zhao


Currently setting Quota is invalid if set to 0. It's actually going to be set 
to -1.
{code:java}
store.getVolume(volumeName).getBucket(bucketName).setQuota(
        OzoneQuota.parseQuota("0GB", 0));
    Assert.assertEquals(-1, bucket.getQuotaInBytes());
    Assert.assertEquals(-1, bucket.getQuotaInNamespace());
{code}
This behavior is actually incorrect, and we should actually support quota 
setting to 0:
{code:java}
store.getVolume(volumeName).getBucket(bucketName).setQuota(
        OzoneQuota.parseQuota("0GB", 0));
    Assert.assertEquals(0, bucket.getQuotaInBytes());
    Assert.assertEquals(0, bucket.getQuotaInNamespace());
{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