sangkyoonnam commented on PR #1208:
URL: https://github.com/apache/flink-agents/pull/1208#issuecomment-6073396898

   One interaction with #1182, which touches the same `__await__`. #1182 adds 
an `_is_cancellation` hook to `DurableFuture.__await__`, so an error it accepts 
leaves the handle unresolved instead of caching it. `_SingleDurableFuture` and 
`_GatherDurableFuture` return `is_java_interruption(error)` from it, and 
`_finalize_batch_execution` re-raises an interrupted durable child instead of 
recording it. This PR moves `__await__` into `AsyncFuture`, so the two conflict 
there: a trial merge of e2e37c4e with #1182's head dfa36e96 conflicts only in 
`python/flink_agents/api/runner_context.py`, at that line.
   
   Whichever lands second, I think the ordinary side needs the same treatment 
to meet "Interruption/cancellation propagates without caching a terminal 
business failure". In Python, a callback interrupted from Java surfaces as a 
regular `Exception`, so today an ordinary handle caches it and 
`_BatchAsyncExecutionResult` records it as a per-item failure. Java already 
does: `AsyncFutureImpl` rethrows `InterruptedException` without caching, and 
`executeAllWithoutDurableState` rethrows an interrupted ordinary child. The 
Python counterpart would keep the hook in `AsyncFuture.__await__`, return 
`is_java_interruption` from `_SingleAsyncFuture` and `_GatherAsyncFuture`, and 
re-raise an interrupted ordinary child in `_BatchAsyncExecutionResult` before 
filling `outcomes`.
   
   If #1182 goes in first, I can send those three changes as a follow-up 
against this PR's API, unless you'd rather fold them in here.
   


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