shashank created CAMEL-27542:
--------------------------------

             Summary: camel-core - when the InMemorySagaService stops, a caller 
that waits for the outcome of a saga finalization that is still running waits 
until the shutdown timeout
                 Key: CAMEL-27542
                 URL: https://issues.apache.org/jira/browse/CAMEL-27542
             Project: Camel
          Issue Type: Bug
          Components: camel-core
            Reporter: shashank
            Assignee: shashank


h3. What happens

Since CAMEL-27417, a {{compensate()}} or {{complete()}} that loses {{end()}} 
waits for the outcome of the finalization that won it, instead of answering 
success while the saga is still COMPENSATING or COMPLETING. When the 
{{InMemorySagaService}} stops while that finalization runs, its executor drops 
the task, and the outcome is never completed: the caller keeps waiting until 
the shutdown of the CamelContext times out. Before CAMEL-27417 it got an 
immediate (and possibly false) success.

Failing only the waiters' outcome is not enough: the caller answers from the 
saga status, which is still COMPENSATING or COMPLETING, so it would report 
success. The outcome of the finalization itself also stays open when the 
executor drops its task.

h3. Fix

When the service stops, complete the open finalization outcomes of its sagas 
exceptionally (for example a {{RejectedExecutionException}} or a 
{{CamelExecutionException}} saying the saga service stopped), and make a 
waiting caller report that failure instead of reading the status. Follow-up of 
CAMEL-27417, as discussed in its pull request.

_Filed with Claude Code on behalf of allthingssecurity._



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to