[ 
https://issues.apache.org/jira/browse/FLINK-23689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jiayi Liao updated FLINK-23689:
-------------------------------
    Description: 
FLINK-9857 enabled {{SystemProcessingTimeService}}  to fire processing timers 
by 1ms delay but it ignored {{TestProcessingTimeService}}, and the method 
{{TestProcessingTimeService.setCurrentTime}} can still trigger the processing 
timers whose timestamp equals to {{currentTime}}. 

{code:java}
while (!priorityQueue.isEmpty() && currentTime >= priorityQueue.peek().f0) {
    ..
}
{code}

We can simply fix the problem with {{currentTime > priorityQueue.peek().f0}}, 
but it will break too many existing tests: 

* Tests using {{TestProcessingTimeService.setCurrentTime(long)}} (64 usage)
* Tests using {{AbstractStreamOperatorTestHarness.setProcessingTime(long)}} 
(368 usage)

Tips: Some tests can be fixed with plusing 1ms on the parameter of 
{{TestProcessingTimeService.setCurrentTime(long)}}, but this doesn't work in 
tests that invokes {{setCurrentTime(long)}} for serveral times.


  was:
FLINK-9857 enabled {{SystemProcessingTimeService}}  to fire processing timers 
by 1ms delay but it ignored {{TestProcessingTimeService}}, and the method 
{{TestProcessingTimeService.setCurrentTime}} can still trigger the processing 
timers whose timestamp is equal to {{currentTime}}. 

{code:java}
while (!priorityQueue.isEmpty() && currentTime >= priorityQueue.peek().f0) {
    ..
}
{code}

We can simply fix the problem with {{currentTime > priorityQueue.peek().f0}}, 
but it will break too many existing tests: 

* Tests using {{TestProcessingTimeService.setCurrentTime(long)}} (64 usage)
* Tests using {{AbstractStreamOperatorTestHarness.setProcessingTime(long)}} 
(368 usage)

Tips: Some tests can be fixed with plusing 1ms on the parameter of 
{{TestProcessingTimeService.setCurrentTime(long)}}, but this doesn't work in 
tests that invokes {{setCurrentTime(long)}} for serveral times.



> TestProcessingTimeService.setCurrentTime(long) not delay the firing timer by 
> 1ms delay
> --------------------------------------------------------------------------------------
>
>                 Key: FLINK-23689
>                 URL: https://issues.apache.org/jira/browse/FLINK-23689
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Task, Tests
>    Affects Versions: 1.11.4, 1.14.0, 1.12.4, 1.13.2
>            Reporter: Jiayi Liao
>            Priority: Major
>              Labels: test-stability
>
> FLINK-9857 enabled {{SystemProcessingTimeService}}  to fire processing timers 
> by 1ms delay but it ignored {{TestProcessingTimeService}}, and the method 
> {{TestProcessingTimeService.setCurrentTime}} can still trigger the processing 
> timers whose timestamp equals to {{currentTime}}. 
> {code:java}
> while (!priorityQueue.isEmpty() && currentTime >= priorityQueue.peek().f0) {
>     ..
> }
> {code}
> We can simply fix the problem with {{currentTime > priorityQueue.peek().f0}}, 
> but it will break too many existing tests: 
> * Tests using {{TestProcessingTimeService.setCurrentTime(long)}} (64 usage)
> * Tests using {{AbstractStreamOperatorTestHarness.setProcessingTime(long)}} 
> (368 usage)
> Tips: Some tests can be fixed with plusing 1ms on the parameter of 
> {{TestProcessingTimeService.setCurrentTime(long)}}, but this doesn't work in 
> tests that invokes {{setCurrentTime(long)}} for serveral times.



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

Reply via email to