You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2015/10/02 17:45:26 UTC

[jira] [Commented] (LUCENE-6823) Remove use of System.currentTimeMillis() from LocalReplicator

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

Steve Rowe commented on LUCENE-6823:
------------------------------------

[~ichattopadhyaya], it's better to convert between time units using {{TimeUnit.TARGETUNIT.convert(sourceDuration, TimeUnit.SOURCEUNIT)}}, rather than using hard-coded conversion constants, which could be accidentally wrong.  E.g. to convert from nanos to millis: {{TimeUnit.MILLISECONDS.convert(nanoseconds, TimeUnit.NANOSECONDS)}}.

> Remove use of System.currentTimeMillis() from LocalReplicator
> -------------------------------------------------------------
>
>                 Key: LUCENE-6823
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6823
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Ishan Chattopadhyaya
>            Priority: Minor
>         Attachments: LUCENE-6823.patch
>
>
> LocalReplicator uses System.currentTimeMillis() for session expiry, which is not guaranteed monotonic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org