wenjin272 opened a new issue, #1353: URL: https://github.com/apache/flink-agents/issues/1353
### Search before asking - [x] I searched the existing issues and found no issue tracking this checkpoint-drain failure. #1119 introduced the low-JDK parallel engine and its drain-based checkpoint protocol. ### Description On the Java parallel execution engine for JDK < 21, `prepareSnapshotPreBarrier()` stops dispatch and waits for all pulled actions to finish and commit before taking a checkpoint. A slow external call through `durableExecuteAsync` releases the execution lock, but the checkpoint still waits for the call to return. If the checkpoint expires, `awaitQuiesce()` throws when it observes the abort notification. This can turn a checkpoint timeout into a task failure, even when checkpoint failures are otherwise tolerated. Retrying the same slow call after recovery can repeat this cycle. Expected: checkpoint unfinished actions without waiting for external calls, and preserve those actions for ordered replay after recovery. A checkpoint abort should not itself fail or leave action dispatch paused. ### How to reproduce 1. Run a pure-Java Agent on JDK 11 or 17 with `parallel-execution.enabled=true`. 2. Start an Action that waits inside `durableExecuteAsync` on a controllable external-call gate. 3. Keep the gate closed and trigger a checkpoint with a short timeout. Keep the input volume below `max-in-flight-input-records` to isolate drain from input-admission backpressure. 4. The checkpoint waits in pre-barrier drain; on abort, the drain path throws and fails the task. The fix needs to persist pulled-but-uncommitted root ActionTasks in Flink keyed state, remove them atomically with completion commit, and restore them in dispatch order ahead of tasks not yet started. Simply deleting drain would lose these tasks on recovery. ### Version and environment Flink Agents main at `f7cebf619` (1.0-SNAPSHOT). Affected path: Java JDK < 21 parallel engine. JDK 21 continuation execution and Python coroutine execution have separate scheduling paths. ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- 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]
