apache / apache/beam

Multiple ApiServiceDescriptors in InstructionRequest leading to unintentional multiple instances of objects in the Java SDK

Open
#19,145 0 comments 0 reactions 0 assignees View on GitHub
fn-execution java new feature P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

I noticed that that two separate instances of the ApiServiceDescriptors exist in the instruction request.

This is used as a key to access the BeamFnDataGrpcMultiplexer, and new instances are created if a differing ApiServiceDescriptors is used to access it. 

The InstructionRequest .

I encountered this while trying to add some code in ProcessBundleHandler that needed to access the BeamFnDataGrpcMultiplexer and I used the ProcessBundle root ApiServiceDescriptor.

One usage is in the ProcessBundleDescriptor. The second comes from the RemoteGrpcPort. Which actually comes out of a serialized bytes field. See RemoteGrpcPortWrite::fromPTransform

Imported from Jira [BEAM-5972](https://issues.apache.org/jira/browse/BEAM-5972). Original Jira may contain additional context.
Reported by: ajamato@google.com.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.