zhangyue19921010 opened a new pull request, #11268:
URL: https://github.com/apache/paimon/pull/11268

   ### Purpose
   
`FormatTableCommitTest.testAbortFailureDoesNotReplaceInterruptedCleanupFailure` 
is flaky. It failed in an unrelated [CI 
run](https://github.com/apache/paimon/actions/runs/44469977592/job/135377003942)
 with `Expecting actual not to be null` at the `failure` assertion.
   
   The test interrupts the committing thread and then releases the blocked 
cleanup deletes right away. If the deletes finish before the caller starts 
waiting in `SideEffectTask.result()`, the results are already complete. The 
caller never waits, never sees the interrupt, and the commit succeeds with the 
interrupt flag still set. The runner is meant to behave this way, as 
`testLocalSideEffectRunnerPreservesDirectExecutorCallerInterrupt` asserts, so 
the test is wrong, not the runner. This race has existed since #9397.
   
   The fix releases the deletes only after the caller has cleared its interrupt 
flag. The caller clears that flag only when it observes the interrupt, so the 
cleanup failure is now deterministic. Production code is unchanged.
   
   ### Tests
   
   With a temporary 300 ms busy-wait added before the caller consumes the first 
result (not committed), the old test fails at the same assertion as in CI and 
the updated test passes. Without it, all 73 `FormatTableCommitTest` cases pass 
on JDK 11, along with Checkstyle and Spotless.


-- 
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