[ 
https://issues.apache.org/jira/browse/HDFS-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014689#comment-13014689
 ] 

John George commented on HDFS-1189:
-----------------------------------

I ran ant test, test-patch and the following manual tests:
1. set Quota on a directory (both types) - pass
2. clear Quotas on that directory  - pass
3. clear Quotas on a directory that does not have set Quotas - pass
4. set & clear Quotas on root node - pass

The attached test-patch tests for the use case where a namespace is set and 
then cleared and then set again. This is where the bug shows up. After the 
namespace quota is set the second time after clearing once, it should get set 
to the right value and any file creation that exceeds the space quota should 
fail.

the test-patch for .20 branch and had the following output. The patch should 
not change any eclipse classpatch but the tests fail for that. I doubt if its 
anything to do with the patch.

     [exec] -1 overall.
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 4 new or 
modified tests.
     [exec] 
     [exec]     -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs 
warnings.
     [exec] 
     [exec]     -1 Eclipse classpath. The patch causes the Eclipse classpath to 
differ from the contents of the lib directories.
     [exec]
     [exec] 
     [exec] 
     [exec]
     [exec] 
======================================================================
     [exec] 
======================================================================
     [exec]     Finished build.
     [exec] 
======================================================================
     [exec] 
======================================================================
     [exec]
     [exec]


> Quota counts missed between clear quota and set quota
> -----------------------------------------------------
>
>                 Key: HDFS-1189
>                 URL: https://issues.apache.org/jira/browse/HDFS-1189
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20.204.0
>            Reporter: Kang Xiao
>            Assignee: John George
>              Labels: hdfs, quota
>             Fix For: 0.20.204.0
>
>         Attachments: HDFS-1189-for_20.204.patch, HDFS-1189.patch, 
> HDFS-1189.patch, HDFS-1189.patch, hdfs-1189-1.patch
>
>
> HDFS Quota counts will be missed between a clear quota operation and a set 
> quota.
> When setting quota for a dir, the INodeDirectory will be replaced by 
> INodeDirectoryWithQuota and dir.isQuotaSet() becomes true. When 
> INodeDirectoryWithQuota  is newly created, quota counting will be performed. 
> However, when clearing quota, the quota conf is set to -1 and 
> dir.isQuotaSet() becomes false while INodeDirectoryWithQuota will NOT be 
> replaced back to INodeDirectory.
> FSDirectory.updateCount just update the quota count for inodes that 
> isQuotaSet() is true. So after clear quota for a dir, its quota counts will 
> not be updated and it's reasonable. But when re seting quota for this dir, 
> quota counting will not be performed and some counts will be missed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to