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

Xiaogang Shi commented on FLINK-13848:
--------------------------------------

Hi [~SleePy], what's your detailed plan on implementing these methods?

Once we attempted to implement these methods in our private branches. I am very 
happy to share some experience here.

Our implementation is similar to that in java's {{ScheduledThreadPoolExecutor}} 
except that new tasks are submitted via Akka's dispatcher.  One problem we 
encountered is that we can only cancel the scheduling of task messages in Akka, 
but fail to cancel those task messages already sent. Finally, some tasks are 
still be executed after the {{ScheduledFuture}} is cancelled, leading to some 
weird concurrent behaviors. 

Given that few benefits are brought by Akka's dispatcher, we decided to use a 
non-main-threaded {{ScheduledExecutorService}} together with {{runAsync}} to 
achieve periodic triggering in main thread. The new implementation suffers from 
the same problem, but is much simpler.

> Support “scheduleAtFixedRate/scheduleAtFixedDelay” in 
> RpcEndpoint#MainThreadExecutor
> ------------------------------------------------------------------------------------
>
>                 Key: FLINK-13848
>                 URL: https://issues.apache.org/jira/browse/FLINK-13848
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>            Reporter: Biao Liu
>            Priority: Major
>             Fix For: 1.10.0
>
>
> Currently the methods “scheduleAtFixedRate/scheduleAtFixedDelay" of 
> {{RpcEndpoint#MainThreadExecutor}} are not implemented. Because there was no 
> requirement on them before.
> Now we are planning to implement these methods to support periodic checkpoint 
> triggering.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to