You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/22 11:33:00 UTC

[jira] [Updated] (FLINK-11718) Add onStart method to RpcEndpoint which is run in the actor's main thread

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

ASF GitHub Bot updated FLINK-11718:
-----------------------------------
    Labels: pull-request-available  (was: )

> Add onStart method to RpcEndpoint which is run in the actor's main thread
> -------------------------------------------------------------------------
>
>                 Key: FLINK-11718
>                 URL: https://issues.apache.org/jira/browse/FLINK-11718
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Coordination
>    Affects Versions: 1.8.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Major
>              Labels: pull-request-available
>
> I propose to introduce a {{RpcEndpoint#onStart}} method which is called when the {{RpcEndpoint}} is started via {{RpcEndpoint#start}}. At the moment, users will override {{#start}} where they need to remember to also call {{super.start()}} in order to actually start the {{RpcEndpoint}}. Moreover, the logic executed by {{start}} won't be run in the actor's main thread. This is problematic if the method triggers asynchronous behaviour which is executed in the actor's main thread. If that is the case, it can happen that the asynchronous operation is executed before the {{start}} method has been finished. 
> Due to these problems, I suggest to introduce a {{RpcEndpoint#onStart}} method which can be overriden by sub classes similarly to the {{RpcEndpoint#onStop}} method. The {{onStart}} method can be used to setup the {{RpcEndpoint}} and is guaranteed to be executed before any other message is processed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)