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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to