gnodet opened a new pull request, #23777: URL: https://github.com/apache/camel/pull/23777
[CAMEL-23681](https://issues.apache.org/jira/browse/CAMEL-23681) ## Summary - Fix race condition in `DefaultUnitOfWork.pushRoute()`/`popRoute()` when `split().parallelProcessing().shareUnitOfWork()` causes multiple threads to concurrently access the route stack - The CAMEL-23686 optimization replaced `ConcurrentLinkedDeque` with a plain `Route` field + lazy `ArrayDeque`, reintroducing the race originally fixed in CAMEL-22533 - Protect route stack operations with the existing `ReentrantLock` — preserves the memory optimization while restoring thread safety ## Test plan - [x] `SplitParallelSharedUoWIssueTest` (100 repetitions): went from 58 errors to 0 errors - [x] `SplitterShareUnitOfWorkTest`, `SplitSubUnitOfWorkStopOnExceptionAndParallelTest`, `MulticastShareUnitOfWorkOnExceptionHandledFalseIssueTest`, `SplitterShareUnitOfWorkCompletionAwareTest` all pass _Claude Code on behalf of Guillaume Nodet_ -- 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]
