allthingssecurity commented on PR #26788:
URL: https://github.com/apache/camel/pull/26788#issuecomment-5797994970

   @oscerd thanks, good catch on the overlap. Here is how I'd reconcile it.
   
   **One behaviour:** a group that was completed before the aggregation failed, 
or before an optimistic-locking retry, is **sent at once**, as in #26789. The 
mark from this PR keeps the recover task off it until `onSubmitCompletion` has 
registered it as in progress. So the failure-path `unmarkCompleting` in this 
PR's `doProcess` finally is only needed while #26789 isn't in. Without #26789 
the completed group is not submitted, so the mark has to be cleared for the 
recover task to deliver it. Once #26789 is in, that line goes away: 
`onSubmitCompletion` clears the mark after registering the group as in 
progress, so there's no gap where the recover task could pick it up.
   
   **Order:** #26785 → #26789 → this PR, rebased onto #26789 (dropping the 
failure-path unmark) → #26790. #26791 is in camel-support and independent.
   
   **Checked:** I stacked all five (#26785, #26789, #26788 including 53559c2, 
#26790, #26791) locally. All 246 aggregate tests in camel-support, 
camel-core-processor and camel-core pass. I also added a test for exactly the 
case you describe. It uses a recoverable repository 
(`KeyValueAggregationRepository` with a 50 ms recovery interval): the group is 
pre-completed, then the next exchange fails to aggregate. The group is 
delivered once, it's still delivered only once after several recovery runs, and 
it gets confirmed. I'll add that test to this PR in the rebase.
   
   If you'd rather review it as one change, I can close #26788/#26789/#26790 
and open a single PR with the three commits on `doProcess`/`onCompletion` 
instead. Whatever is easier for you.
   
   _Claude Code on behalf of allthingssecurity_


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