SbloodyS commented on PR #18667: URL: https://github.com/apache/dolphinscheduler/pull/18667#issuecomment-6309065565
### The original stop problem remains for an in-flight synchronous SQL job [Source evidence] `dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java:239–243` The latest change fixes snapshot alignment after a synchronous INSERT has completed, but it does not cover stopping that INSERT while it is still running. With `table.dml-sync=true`, the SQL Client waits for execution to finish instead of printing `Job ID:`. For a remote standalone/session job, stopping the client therefore leaves no recognized JobID for this cancellation path. `cancelFlinkJob()` logs the missing identifier and returns normally without issuing a remote cancellation. The SQL Client's shutdown hook closes the session; its result-store cleanup covers queries, rather than providing a general cancellation mechanism for synchronous DML. Killing the client should therefore not be treated as proof that the remote job was cancelled. Please retain a controllable submission identifier while synchronous DML is running and use it for remote cancellation. If the identifier cannot be obtained, surface that failure instead of returning as though remote cleanup succeeded. Cover stopping a still-running synchronous INSERT, rather than only a completed synchronous INSERT followed by another job. References: - https://github.com/apache/flink/blob/release-1.16/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java#L574-L596 - https://github.com/apache/flink/blob/release-1.16/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java ### Incomplete AOP compatibility fix: ambiguous application mapping still falls through to execution [Source evidence] `dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java:377–383` The single-application fallback restores the previously reported AOP scenario. However, when several applications are known and a job cannot be associated with one, this branch only logs an error and returns. `savePoint()` then executes the command without `-yid`. When no other configuration reliably selects the correct application, this falls back to the local/default cluster instead of reporting the unresolved targeting information to the caller. The new `testSavePointDoesNotGuessTheApplicationOfAMultiApplicationTask` explicitly expects these commands to execute and mocks them as successful, so it does not verify failure propagation. Please fail explicitly for an unresolved YARN job that has no reliable alternative cluster targeting, while preserving jobs whose endpoint is independently known. Update the ambiguous-mapping test to assert that the affected savepoint command is not executed and the caller receives a failure. -- 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]
