[ 
https://issues.apache.org/jira/browse/HDFS-6355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin Patrick McCabe updated HDFS-6355:
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.0
           Status: Resolved  (was: Patch Available)

committed, thanks

> Fix divide-by-zero, improper use of wall-clock time in BlockPoolSliceScanner
> ----------------------------------------------------------------------------
>
>                 Key: HDFS-6355
>                 URL: https://issues.apache.org/jira/browse/HDFS-6355
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>             Fix For: 2.5.0
>
>         Attachments: HDFS-6355.001.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to