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

Qingsheng Ren updated FLINK-33630:
----------------------------------
    Description: 
FLINK-26077 introduced a two-way RPC between operator and coordinator, but 
{{CoordinationResponse}} is not wrapped by {{{}SerializedValue{}}}:

 
[https://github.com/apache/flink/blob/c61c09e464073fae430cab2dd56bd608f9d275fd/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/a.java#L254-L255|https://github.com/apache/flink/blob/34620fc5c5698d00e64c6b15f8ce84f807a2e0d7/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterOperatorEventGateway.java#L54]
 
This might be a problem if the implementation of {{CoordinationResponse}} is 
provided in user code and loaded by user code classloader, because Pekko RPC 
handler always uses app classloader for serializing and deserializing RPC 
parameters and return values, which will lead to {{ClassNotFoundException}} in 
this case. Similar to what we do for the request, we need to wrap a 
{{SerializesValue}} around the response to make sure RPC calls won't cause 
{{{}ClassNotFoundException{}}}.

  was:
FLINK-26077 introduced a two-way RPC between operator and coordinator, but 
{{CoordinationResponse}} are not wrapped by {{{}SerializedValue{}}}:

 
[https://github.com/apache/flink/blob/c61c09e464073fae430cab2dd56bd608f9d275fd/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/a.java#L254-L255|https://github.com/apache/flink/blob/34620fc5c5698d00e64c6b15f8ce84f807a2e0d7/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterOperatorEventGateway.java#L54]
 
This might be a problem if the implementation of {{CoordinationResponse}} is 
provided in user code and loaded by user code classloader, because Pekko RPC 
handler always uses app classloader for serializing and deserializing RPC 
parameters and return values, which will lead to {{ClassNotFoundException}} in 
this case. Similar to what we do for the request, we need to wrap a 
{{SerializesValue}} around the response to make sure RPC calls won't cause 
{{{}ClassNotFoundException{}}}.


> CoordinationResponse should be wrapped by SerializedValue in 
> TaskOperatorEventGateway and JobMasterOperatorEventGateway
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-33630
>                 URL: https://issues.apache.org/jira/browse/FLINK-33630
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 1.18.0, 1.17.1
>            Reporter: Qingsheng Ren
>            Priority: Major
>
> FLINK-26077 introduced a two-way RPC between operator and coordinator, but 
> {{CoordinationResponse}} is not wrapped by {{{}SerializedValue{}}}:
>  
> [https://github.com/apache/flink/blob/c61c09e464073fae430cab2dd56bd608f9d275fd/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/a.java#L254-L255|https://github.com/apache/flink/blob/34620fc5c5698d00e64c6b15f8ce84f807a2e0d7/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterOperatorEventGateway.java#L54]
>  
> This might be a problem if the implementation of {{CoordinationResponse}} is 
> provided in user code and loaded by user code classloader, because Pekko RPC 
> handler always uses app classloader for serializing and deserializing RPC 
> parameters and return values, which will lead to {{ClassNotFoundException}} 
> in this case. Similar to what we do for the request, we need to wrap a 
> {{SerializesValue}} around the response to make sure RPC calls won't cause 
> {{{}ClassNotFoundException{}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to