You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Minbo Bae (Jira)" <ji...@apache.org> on 2021/02/18 07:14:00 UTC

[jira] [Created] (BEAM-11832) Time correction by NTP sync can skew metrics

Minbo Bae created BEAM-11832:
--------------------------------

             Summary: Time correction by NTP sync can skew metrics
                 Key: BEAM-11832
                 URL: https://issues.apache.org/jira/browse/BEAM-11832
             Project: Beam
          Issue Type: Bug
          Components: runner-dataflow
            Reporter: Minbo Bae


GCE VM time can be corrected by NTP sync. If this happens,`System.currentTimeMillis()` can set back to the past. 

The rolled back clock can cause skewed metrics as `ExecutionStateSampler` using `System.currentTimeMillis` [1]. I guess we can mitigate this issue using `System.nanoTime` for elapsed times (maybe not perfect as per [2]).

[1] [https://github.com/apache/beam/blob/v2.27.0/runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/ExecutionStateSampler.java#L42]

[2] https://bugs.openjdk.java.net/browse/JDK-6458294



--
This message was sent by Atlassian Jira
(v8.3.4#803005)