MartijnVisser opened a new pull request, #28656:
URL: https://github.com/apache/flink/pull/28656
## What is the purpose of the change
Backport of the master fix for FLINK-40074 (#28653), a clean cherry-pick of
6a99fec0750. `SinkV2ITCase.writerAndCommitterExecuteInStreamingModeWithScaling`
carries a latent teardown race on this branch: the checkpoint directory is
injected as a per-method JUnit `@TempDir`, but the class-shared MiniCluster
keeps discarding checkpoint state asynchronously after
`requestJobResult().get()` returns, so JUnit's temp-directory deletion can race
with Flink's discard and fail with `IOException: Failed to delete temp
directory`. The race currently manifests nightly on release-1.20 (19 of the
last 25 failed nightly runs); the same ingredients exist here, only the timing
differs.
## Brief change log
- Manage the scaling test's checkpoint directory explicitly
(`Files.createTempDirectory`) instead of injecting it via `@TempDir`.
- Clean it up in a `finally` block with `FileUtils.deleteDirectoryQuietly`,
which is safe against concurrent deletions and never lets a cleanup failure
mask a real assertion failure.
- No change to the test's assertions or job logic.
## Verifying this change
This change is already covered by the existing test
`SinkV2ITCase.writerAndCommitterExecuteInStreamingModeWithScaling`. Verified
locally on this branch: the method passes (3/3 parameterized cases) and
`spotless:check` is clean.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no (test-only change)
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (Claude Fable 5)
Generated-by: Claude Fable 5
--
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]