Croway opened a new pull request, #22492:
URL: https://github.com/apache/camel/pull/22492

   ## Summary
   
   - Fix deadlock when using `SynchronousExecutorService` with split + 
aggregate in transacted routes
   - CAMEL-23030 changed `scheduleSync(task)` to `schedule(task)` for 
`SynchronousExecutorService`. The aggregated exchange loses the transacted flag 
(`Exchange.copy()` doesn't preserve it), so this new branch is always taken. 
`schedule()` queues the completion task, but the surrounding transacted split 
creates nested `await → executeFromQueue` cycles where 
`Pipeline.scheduleMain()` queue swapping makes the task unreachable — deadlock.
   - Fix: process the completion task inline via `processor.process(exchange, 
callback)` for `SynchronousExecutorService`, bypassing the reactive queue 
entirely. No deadlock, no stack overflow.
   
   ## Test plan
   
   - [x] `SplitAggregateInChoiceSynchronousExecutorTest` — 3 tests covering 
non-transacted, transacted, and transacted+choice scenarios
   - [x] `SplitAggregateSynchronousExecutorStackOverflowIssueTest` — 
CAMEL-23030 regression guard still passes
   - [x] `SplitAggregateStackOverflowIssueTest` and 
`SplitAggregateParallelProcessingStackOverflowIssueTest` — existing tests pass


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