cshuo opened a new pull request, #20339: URL: https://github.com/apache/hudi/pull/20339
### Describe the issue this Pull Request addresses Closes https://github.com/apache/hudi/issues/20331. During same-graph global failover, `resetToCheckpoint()` can run recovery while the coordinator executor is still committing the same instant, producing duplicate completed timeline files and commit callbacks. ### Summary and Changelog - Run the live coordinator's `restoreEvents()` through `executor.executeSync()`, ordering recovery after queued events and commits and finishing it before reset returns. - Add a regression test that pauses a normal commit, triggers reset concurrently, and checks that reset waits and the instant is committed only once, with one physical completed file. Validation: the new regression fails before the fix (including all three automatic retries). After the fix, the coordinator test class passes: 61 tests, 0 failures, 0 errors, 1 existing disabled test skipped. Checkstyle passes. ```bash mvn -B -Dflink1.20 -pl hudi-flink-datasource/hudi-flink -am -Dtest=TestStreamWriteOperatorCoordinator -Dsurefire.failIfNoSpecifiedTests=false -DskipITs -DskipSparkTests -DskipScalaTests test ``` ### Impact Prevents overlapping checkpoint and recovery commits. Initial restoration during `start()` is unchanged; no public API or storage-format changes. ### Risk Level Low. Recovery now waits for earlier executor work; a stalled commit can delay reset. Existing synchronous recovery already performs commit I/O before returning. ### Documentation Update None. ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
