You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Till Rohrmann (JIRA)" <ji...@apache.org> on 2019/02/27 11:31:00 UTC
[jira] [Closed] (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 ]
Till Rohrmann closed FLINK-11718.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.8.0
Fixed via
master:
ba089aa593
579f5e0824
af69289935
6b9b242988
1023694244
09568bd304
1.8.0:
98baea31bc
f6cbd8b05a
68c2aaf74c
008701d356
51d428a933
8e66e9bce2
> 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
> Fix For: 1.8.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)