Ashfaqbs commented on code in PR #1071:
URL: https://github.com/apache/flink-agents/pull/1071#discussion_r3915950776


##########
runtime/src/main/java/org/apache/flink/agents/runtime/context/RunnerContextImpl.java:
##########
@@ -939,6 +945,12 @@ protected <T> T executeAndFinalizeCurrentCall(
         Exception exception = null;
         try {
             result = callSupplier.call();
+        } catch (InterruptedException e) {
+            // A cancellation signal, not a genuine call failure: leave the 
pending call
+            // unfinalized so recovery re-executes or reconciles it instead of 
replaying a stale
+            // interruption as a completed success or failure.
+            Thread.currentThread().interrupt();
+            throw e;

Review Comment:
   Good catch, worth folding in. Traced it: ActionExecutionOperator persists 
the action as completed at line ~491 
(durableExecManager.maybePersistTaskResult) right after the tool-call catch 
swallows the interruption, and on recovery line ~437 
(actionState.isCompleted()) skips re-execution and replays the stale output. 
Confirms it's the same class of problem as #1070's problem 2, just reached 
through the action-state path instead of the durable-slot path since the chat 
path's raw rethrow at line 482 escapes before the persist call. I'll fold this 
into the follow-up issue's description when I file it.



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