MartijnVisser opened a new pull request, #28654:
URL: https://github.com/apache/flink/pull/28654

   ## What is the purpose of the change
   
   Backport of the master fix for FLINK-40074 (#28653). 
`SinkV2ITCase.writerAndCommitterExecuteInStreamingModeWithScaling` is the 
single largest cause of red release-1.20 nightlies (19 of the last 25 failed 
runs, 37 test errors, ~2026-06-08 to 2026-07-06, across all JDK/profile legs). 
The failure is a teardown race between JUnit's per-method `@TempDir` deletion 
of the checkpoint directory and the class-shared MiniCluster's asynchronous 
checkpoint discard, which continues after `requestJobResult().get()` returns; 
it surfaces as `IOException: Failed to delete temp directory` even though all 
assertions pass.
   
   ## Brief change log
   
   - Same as the master PR: manage the checkpoint directory explicitly and 
clean it up in a `finally` block with `FileUtils.deleteDirectoryQuietly`.
   - The Hamcrest assertion in the 1.20 version of the test was deliberately 
left as-is (not migrated to AssertJ) to keep the backport diff minimal and 
focused on the race.
   
   ## Verifying this change
   
   This change is already covered by the existing test 
`SinkV2ITCase.writerAndCommitterExecuteInStreamingModeWithScaling`. Verified 
locally on release-1.20: the previously flaky method passes (3/3 parameterized 
cases) across repeated executions, the full `SinkV2ITCase` class passes (7/7), 
and `spotless:check` is clean. CI to watch after merge: the release-1.20 
nightly `Test (module: tests)` legs.
   
   ## 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]

Reply via email to