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

Sergey Shelukhin commented on HIVE-13051:
-----------------------------------------

NO_DEADLINE is a magic value, however nanoTime can return any value of long (at 
least according to the API doc; the current implementations will not afaik). 
The easiest way to deal with a collision is to get another nanoTime that would 
eventually be slightly different from the magic value.

> Deadline class has numerous issues
> ----------------------------------
>
>                 Key: HIVE-13051
>                 URL: https://issues.apache.org/jira/browse/HIVE-13051
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>             Fix For: 1.3.0, 2.0.1, 2.1.0
>
>         Attachments: HIVE-13051.01.patch, HIVE-13051.patch
>
>
> currentTimeMillis is not a correct way to measure intervals of time; it can 
> easily be adjusted e.g. by ntpd. System.nanoTime should be used.
> It's also unsafe for failure cases, and doesn't appear to update from config 
> updates correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to