davsclaus commented on code in PR #29372:
URL: https://github.com/apache/camel/pull/29372#discussion_r4501559376
##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java:
##########
@@ -1791,10 +1791,15 @@ public void run() {
LOG.trace("Recover check cannot start due CamelContext({}) has
not been started yet", camelContext.getName());
return;
}
+ // a recover check of an earlier start may still run (a stop does
not wait for it): two checks must not run
+ // at the same time, as they share the exchanges in progress
+ if (!recoveryInProgress.compareAndSet(false, true)) {
+ LOG.debug("Skipping recover check as the previous recover
check is still running");
+ return;
+ }
LOG.trace("Starting recover check");
Review Comment:
Agreed it is not a real risk. It is a one-line change though: either move
the `LOG.trace("Starting recover check")` above the `compareAndSet`, or start
the `try` right after it, so nothing sits between the CAS and the `finally`
that clears the flag. Could you apply that, or reply here if you prefer to keep
it as is? This open thread is the last thing that keeps the PR from being
merged.
_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]