wenjin272 opened a new issue, #1447:
URL: https://github.com/apache/flink-agents/issues/1447

   ### Problem
   
   `AsyncBatchExecutor.shutdown()` cancels tracked submissions before stopping 
the worker pool. Cancelling a running task can free a worker, allowing a queued 
callable to execute before shutdown reaches its Future. A queued tool call can 
therefore run during shutdown instead of being cancelled.
   
   The interleaving also invalidates 
`AsyncBatchExecutorTest.closeCancelsSubmissionsAndWaitsForManagedThreadCleanup`'s
 expectation that the queued submission is cancelled. A controlled scheduling 
probe reproduced the queued callable completing before cancellation.
   
   ### Expected behavior
   
   Stop the pool from taking queued work before cancellation releases occupied 
workers, then complete cancellation of tracked submissions and wait for worker 
cleanup.
   
   Related test cleanup should retain shutdown, recovery, timeout and 
late-event coverage while removing assumptions about exact lifecycle handoff 
counts, short worker-start windows, and minimum remote polling counts.
   


-- 
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]

Reply via email to