MartijnVisser opened a new pull request, #28581: URL: https://github.com/apache/flink/pull/28581
## What is the purpose of the change Backport of [FLINK-38406](https://issues.apache.org/jira/browse/FLINK-38406) to `release-1.20`. `DefaultSchedulerCheckpointCoordinatorTest` is flaky because it invokes `ExecutionGraph` operations (`failJob`, `suspend`, `startScheduling`, `closeAsync`) directly instead of from the scheduler main thread. #27061 (commit `bfd13de1520`) fixed this by routing those calls through a `TestingComponentMainThreadExecutor`. The fix is present on `master` and `release-2.3` but was never backported to `release-1.20`, which still exercises the original pre-fix code path and is therefore subject to the same race. Note: I have not observed this specific test failing on a recent `release-1.20` cron (the demonstrated CI failure is on `release-2.2`, [build 76470](https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=76470&view=results)). This backport keeps `release-1.20` consistent with the fixed branches rather than fixing an observed `release-1.20` failure. ## Brief change log - Cherry-pick `bfd13de1520` onto `release-1.20`. - Resolved an import conflict: kept the `org.apache.flink.api.common.time.Time` import (still used by `Time.days(...)` in `createSchedulerAndEnableCheckpointing` on 1.x; 2.x migrated to `java.time.Duration`) and dropped the now-unused `ComponentMainThreadExecutorServiceAdapter` import. ## Verifying this change This change is covered by the modified test itself. Ran `DefaultSchedulerCheckpointCoordinatorTest` locally on `release-1.20`: 4 tests, 0 failures. ## 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: no (test-only change) - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (Claude Opus 4.8) Generated-by: Claude Opus 4.8 (1M context) -- 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]
