Admaing commented on PR #18667: URL: https://github.com/apache/dolphinscheduler/pull/18667#issuecomment-6912967187
Both points are addressed in 38475250: - Stop now waits for the cancellation result. TaskEngine.killTask fires the kill event on the calling thread, the worker RPC waits for it on a dedicated thread pool (bounded to 90s, rpc timeout 2 min) and returns fail(...) with the reason; the API maps it to a failed Result. A task which is already finalized is reported as stopped instead of failing. Tests: TaskEngineTest, PhysicalTaskExecutorOperatorImplTest (including not-found), TaskInstanceServiceTest#testStopTaskReportsTheTaskWhichCouldNotBeStopped. Note the wait is bounded: a cancellation which takes longer than 90s is reported as not confirmed (it never reports success), and keeps running on the worker. - Resource-manager ownership is per job. Every submission keeps its own target (-t/--target/-Dexecution.target, falling back to the deploy mode) and its own application id; only jobs without an application are cancelled through the CLI, and savepoints use the -yid of their own job. A YARN job whose application cannot be identified is reported as a failure instead of being cancelled against the default cluster. Mixed-target coverage: testCancelApplicationCancelsOnlyTheJobsWhichTheResourceManagerDoesNotRun, testFlinkJobSubmissionsKeepTheOwnershipOfEachJob, testSavePointTargetsTheApplicationOfTheJobWhichIsSubmittedToYarnOnly. task-api 156, task-flink 98, task-flink-stream 31, task-executor 2, worker 11, API TaskInstanceServiceTest 9 tests pass, spotless passes. CI workflows are still awaiting maintainer approval. -- 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]
