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

MinWang edited comment on FLINK-15693 at 6/30/20, 11:40 AM:
------------------------------------------------------------

Did you mean one could trigger a rpc during terminating inside the {{onStop}}? 
If that happens, we can not call an rpc over the binding endpoint and any 
external rpcs are prohibited. I think it's OK. What do you think? 


was (Author: anglenet):
Did you mean one could trigger a rpc during terminating inside the {{onStop}}? 
If that happens, we should only let the terminating rpc happen and refuse the 
others. However, we may not know which one is the terminating rpc which leads 
to the above solution. It has the above drawbacks.  

> Stop receiving incoming RPC messages when RpcEndpoint is closing
> ----------------------------------------------------------------
>
>                 Key: FLINK-15693
>                 URL: https://issues.apache.org/jira/browse/FLINK-15693
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Coordination
>    Affects Versions: 1.9.1, 1.10.0
>            Reporter: Till Rohrmann
>            Priority: Major
>             Fix For: 1.11.0
>
>
> When calling {{RpcEndpoint#closeAsync()}}, the system triggers 
> {{RpcEndpoint#onStop}} and transitions the endpoint into the 
> {{TerminatingState}}. In order to allow asynchronous clean up operations, the 
> main thread executor is not shut down immediately. As a side effect, the 
> {{RpcEndpoint}} still accepts incoming RPC messages from other components. 
> I think it would be cleaner to no longer accept incoming RPC messages once we 
> are in the {{TerminatingState}}. That way we would not worry about the 
> internal state of the {{RpcEndpoint}} when processing RPC messages (similar 
> to 
> [here|https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java#L952]).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to