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

   ## Summary
   
   Fixes [CAMEL-24143](https://issues.apache.org/jira/browse/CAMEL-24143) — 
medium-severity findings from code review of the Split and Aggregate EIP 
processors.
   
   ## Changes
   
   ### Splitter
   
   - **Processed vs total items**: `SplitResult.getSuccessCount()` now uses 
actual processed count instead of total items, giving correct results after an 
abort
   - **Stop/rollback semantics**: `shouldContinueOnFailure` no longer counts 
deliberate `.stop()` or rollback as failures
   - **Error threshold accuracy**: ratio calculation now uses processed items 
(not index+1), avoiding off-by-one in parallel mode
   - **Exception-only failures**: only unhandled exceptions are recorded as 
failures — error-handler-handled exceptions don't inflate the count
   - **Watermark validation**: `NumberFormatException` on invalid watermark 
values is now caught and wrapped with a clear error message
   
   ### AggregateProcessor
   
   - **Missing reset**: `completedByInterval` counter was not reset in 
`resetCounters()`
   - **Null-safe stats**: `aggregateCompletionCounter` guards against null 
`completedBy` property
   - **Optimistic lock retry safety**: scheduled retry lambda now catches 
exceptions and propagates them to the exchange instead of losing them
   
   ### SplitResult API
   
   - Added `getProcessedItems()` method (with `@since 4.22` tag) to distinguish 
processed from total items
   
   ## Test plan
   
   - [x] `SplitterErrorThresholdTest` — updated to reliably trigger the 
threshold regardless of parallel completion order
   - [x] `SplitterSplitResultTest` — updated for new `SplitResult` constructor 
with `processedItems`
   
   _Claude Code on behalf of davsclaus_


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