apache / apache/beam

Exceptions in expand() corrupt the TransformHierarchy

Open
#18,473 0 comments 0 reactions 0 assignees View on GitHub
bug core java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
205

Description

Discovered recently during unrelated work that when a composite PTransform (Java) crashes during expand - for example due to a validation failure - it leaves the Pipeline in a state that throws NPEs when it is traversed.

No one has complained, so it doesn't seem critical to fix the mutation logic. But we should set a bit and poison all future uses of the corrupted pipeline.

Imported from Jira [BEAM-2583](https://issues.apache.org/jira/browse/BEAM-2583). Original Jira may contain additional context.
Reported by: kenn.

Contributor guide

Open the contributing guide

Research direction

Inspect the Java Pipeline and TransformHierarchy handling around composite PTransform expansion, using the reported validation-failure scenario as the starting case. Trace what happens after expand() throws and determine how later traversal currently reaches the corrupted state. Done means future uses of a pipeline affected by that failure are rejected rather than producing traversal NPEs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.