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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: