allthingssecurity commented on code in PR #29372:
URL: https://github.com/apache/camel/pull/29372#discussion_r4501771488
##########
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:
Done in 9d3378f2bc6a: the `LOG.trace("Starting recover check")` now comes
before the `compareAndSet`, so the `try` starts right after it and nothing sits
between the CAS and the `finally` that clears the flag. A log line moved, no
behaviour change.
_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]