You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by StephanEwen <gi...@git.apache.org> on 2016/08/10 16:31:48 UTC

[GitHub] flink pull request #2351: [FLINK-4368] [distributed runtime] Eagerly initial...

GitHub user StephanEwen opened a pull request:

    https://github.com/apache/flink/pull/2351

    [FLINK-4368] [distributed runtime] Eagerly initialize the RPC endpoint members

    This eagerly initialized the RPC members like
      - self gateway
      - self reference
      - main thread executor
    and makes them immutable.
    
    This also adds structural comments to the `RpcProtocol` class.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/StephanEwen/incubator-flink eager_initialize

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2351.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2351
    
----
commit 8fdb25c5bbb8d4133791442d37c57bf7f880a8b9
Author: Stephan Ewen <se...@apache.org>
Date:   2016-08-10T16:27:21Z

    [FLINK-4368] [distributed runtime] Eagerly initialize the RPC endpoint members

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2351: [FLINK-4368] [distributed runtime] Eagerly initialize the...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/2351
  
    I think the changes look good.
    
    You're right that this is a problem. The constructor should complete before the rpc endpoint is reachable. 
    
    With the former implementation there was a similar problem though: First you start the actor and then you initialize the self context. If a message arrived between these two calls which triggers access to the self context, it would have caused a NPE.
    
    Maybe one can solve the problem by not publishing the connection address of the rpc endpoint before the constructor has been executed? Then no gateway could connect against the endpoint and send request until the whole endpoint has been initialized.
    
    Or we let the underlying rpc server (e.g. actor) ignore all messages until he has been explicitly told differently. But this would entail that the user has to call something like `rpcEndpoint.startReceivingMessages()`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2351: [FLINK-4368] [distributed runtime] Eagerly initial...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen closed the pull request at:

    https://github.com/apache/flink/pull/2351


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2351: [FLINK-4368] [distributed runtime] Eagerly initialize the...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/2351
  
    +1 for your suggestion.
    
    I will merge this commit then, and then we add the `rpcEndpoint.startReceivingMessages()` on top of it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2351: [FLINK-4368] [distributed runtime] Eagerly initialize the...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/2351
  
    @tillrohrmann What do you think about this?
    
    The downside that I can see is that the RPC endpoint can actually receive calls before the constructor is completed, basically as soon as the base class' constructor is complete. That may actually be an issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2351: [FLINK-4368] [distributed runtime] Eagerly initialize the...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/2351
  
    Manually merged into `flip-6` feature branch in https://github.com/apache/flink/commit/08af7def60d54c22126b902e6fa57101d5fbb8fa


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---