Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4165

Faulty sanity check in FsDirectory.unprotectedSetQuota

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.6.0
    • namenode
    • None
    • Reviewed

    Description

      According to the documentation:

      The quota can have three types of values : (1) 0 or more will set
      the quota to that value, (2)

      {@link HdfsConstants#QUOTA_DONT_SET}

      implies
      the quota will not be changed, and (3)

      {@link HdfsConstants#QUOTA_RESET}


      implies the quota will be reset. Any other value is a runtime error.

      sanity check in FsDirectory.unprotectedSetQuota should use

      nsQuota != HdfsConstants.QUOTA_RESET
      

      rather than

      nsQuota < HdfsConstants.QUOTA_RESET
      

      Since HdfsConstants.QUOTA_RESET is defined to be -1, there is not any problem for this code, but it is better to do it right.

      Attachments

        1. HDFS-4165.patch
          1 kB
          Binglin Chang

        Activity

          People

            decster Binglin Chang
            decster Binglin Chang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: