[
https://issues.apache.org/jira/browse/FLINK-4421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097627#comment-16097627
]
Stephan Ewen commented on FLINK-4421:
-------------------------------------
The clocks can jump due to re-synchronization, and also due to other factors in
virtualized settings. We have seen that happen for example in Travis tests.
Flink's runtime makes no use of time for correctness in any place, so this is
not critical, as far as I know.
But it may lead to test instability, when tests use
{{System.currentTimeMillis()}} to measure deadlines.
It may also lead to "weird metrics", when the JobManager reports a negative
duration for the restart time, for example.
I would actually lazily migrate these, rather than doing a big refactor effort,
because that is prone to introduce other bugs...
> Make clocks and time measurements monotonous
> --------------------------------------------
>
> Key: FLINK-4421
> URL: https://issues.apache.org/jira/browse/FLINK-4421
> Project: Flink
> Issue Type: Improvement
> Components: Core
> Reporter: Stephan Ewen
> Priority: Minor
>
> Currently, many places use {{System.currentTimeMillis()}} to acquire
> timestamps or measure time intervals.
> Since this relies on the system clock, and the system clock is not
> necessarily monotonous (in the presence of clock updates), this can lead to
> negative duration and decreasing timestamps where increasing timestamps are
> expected.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)