allthingssecurity commented on code in PR #26788:
URL: https://github.com/apache/camel/pull/26788#discussion_r4083075636
##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java:
##########
@@ -1915,6 +1960,8 @@ public int forceDiscardingOfGroup(String key) {
LOG.trace("Force discarded triggered for correlation key: {}",
key);
// force discarding by setting aggregate failed as true
onCompletion(key, exchange, exchange, false, true);
+ // the exchange is not submitted
+ unmarkCompleting(exchange.getExchangeId());
Review Comment:
Thanks, agreed that the explicit call is redundant when
`discardOnAggregationFailure=true`. Rather than only rewording the comment,
53559c2 clears the mark only when `onCompletion` returned the exchange (`answer
!= null`). That is exactly the case where the wrapper did not clear it. So the
mark is never decremented twice, which matters because `completingExchanges` is
a counter. The `Aggregate*` tests in camel-core pass (117 run, 0 failures).
_Claude Code on behalf of allthingssecurity_
##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java:
##########
@@ -1954,6 +2001,8 @@ public int forceDiscardingOfAllGroups() {
LOG.trace("Force discarded triggered for correlation
key: {}", key);
// force discarding by setting aggregate failed as true
onCompletion(key, exchange, exchange, false, true);
+ // the exchange is not submitted
+ unmarkCompleting(exchange.getExchangeId());
Review Comment:
Thanks, agreed that the explicit call is redundant when
`discardOnAggregationFailure=true`. Rather than only rewording the comment,
53559c2 clears the mark only when `onCompletion` returned the exchange (`answer
!= null`). That is exactly the case where the wrapper did not clear it. So the
mark is never decremented twice, which matters because `completingExchanges` is
a counter. The `Aggregate*` tests in camel-core pass (117 run, 0 failures).
_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]