damccorm opened a new pull request, #41774:
URL: https://github.com/apache/beam/pull/41774
Note: this PR was auto-generated by tooling. Before moving it out of draft,
the author has done a full review of the PR, specifically evaluating it on the
following criteria:
- The PR is an appropriate fix for the issue (e.g. we're not changing a test
to avoid a bug)
- The PR is a simple fix to the issue (e.g. we're not adding infra when we
could just modify a test)
- The PR is not covering for other problems (e.g. if we're bumping timeouts,
it is not because we're covering for a performance problem)
Full details of the methodology of generation and review can be found here -
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
If you have concerns with the PR or with the underlying methodology used to
generate this, please comment below - they will be addressed by the author not
the tooling :)
## Summary
Fixes 9 cascading test failures in `BeamFlinkDataSetAdapterTest` and
`BeamFlinkDataStreamAdapterTest` in
https://github.com/apache/beam/actions/runs/46098510698
(`:runners:flink:1.19:test`, build scan
https://develocity.apache.org/s/aifilk76kpvcs).
## Production Impact
- **Affected workloads**: Apache Flink jobs using `BeamFlinkDataSetAdapter`
or `BeamFlinkDataStreamAdapter` when multiple adapter jobs run sequentially or
concurrently on the same Flink TaskManager JVM (does not affect Cloud Dataflow).
- **Symptom**: Both adapters hardcoded `JobInfo.create("unusedJobId", ...)`.
Because `FlinkExecutableStageContextFactory` keys its static `jobFactories`
cache by `jobInfo.jobId()` with deferred reference-counted release, subsequent
adapter jobs within the release delay window reuse a stale
`DefaultExecutableStageContext`, stale `GrpcDataService` (timing out with `No
client connected within timeout`), and embedded SDK harness threads holding a
previous Flink job's closed `SafetyNetWrapperClassLoader`
(`IllegalStateException: Trying to access closed classloader`).
- **Resolution**: Generate a unique `UUID.randomUUID().toString()` `jobId`
per translation in both `BeamFlinkDataSetAdapter` and
`BeamFlinkDataStreamAdapter`.
## Changes
- `BeamFlinkDataSetAdapter.java`: Replace hardcoded `"unusedJobId"` with
`UUID.randomUUID().toString()`.
- `BeamFlinkDataStreamAdapter.java`: Replace hardcoded `"unusedJobId"` with
`UUID.randomUUID().toString()`.
### Verification
- Triggered `beam_PreCommit_Java.yml` workflow run on branch:
[`46451758677`](https://github.com/apache/beam/actions/runs/46451758677)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]