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

Fix divide-by-zero, improper use of wall-clock time in BlockPoolSliceScanner

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0
    • None
    • None

    Description

      BlockPoolSliceScanner uses Time.now to calculate an interval. But this is incorrect, since if the wall-clock time changes, we will end up setting the scan periods to a shorter or longer time than we configured.

      There is also a case where we may divide by zero if we get unlucky, because we calculate an interval and divide by it, without checking whether the interval is 0 milliseconds. This would produce an ArithmeticException since we are using longs.

      Attachments

        1. HDFS-6355.001.patch
          8 kB
          Colin McCabe

        Activity

          People

            cmccabe Colin McCabe
            cmccabe Colin McCabe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: