zentol commented on a change in pull request #7966: [FLINK-11887][metrics] 
Fixed latency metrics drift apart
URL: https://github.com/apache/flink/pull/7966#discussion_r268114737
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamSource.java
 ##########
 @@ -154,7 +154,7 @@ public LatencyMarksEmitter(
                                        public void onProcessingTime(long 
timestamp) throws Exception {
                                                try {
                                                        // 
ProcessingTimeService callbacks are executed under the checkpointing lock
-                                                       
output.emitLatencyMarker(new LatencyMarker(timestamp, operatorId, 
subtaskIndex));
+                                                       
output.emitLatencyMarker(new LatencyMarker(System.currentTimeMillis(), 
operatorId, subtaskIndex));
 
 Review comment:
   > I read the test case carefully, and found that this test case is use to 
verify SystemProcessingTimeService
   
   I'm curious how you arrived at that conclusion given that this class isn't 
used in this test.
   
   The test ensures that sources emit the correct latency values, and as such 
has to stay. The test fails since it was based on the arbitrary timestamps, and 
not the actual processing time.
   I've pushed an update to correct the test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to