allthingssecurity commented on code in PR #27524:
URL: https://github.com/apache/camel/pull/27524#discussion_r4215636851
##########
core/camel-api/src/main/java/org/apache/camel/spi/RoutesLoader.java:
##########
@@ -110,6 +110,8 @@ default void loadRoutes(Resource... resources) throws
Exception {
* If a route is loaded with a route id for an existing route, then the
existing route is stopped and remove, so it
* can be updated.
*
+ * The default implementation runs concurrent calls one at a time, see
{@link #updateRoutes(Collection)}.
Review Comment:
Reworded in 3b5a3772f468: the Javadoc now names Camel's
`DefaultRoutesLoader` instead of "the default implementation" (as plain
`{@code}`, since camel-api cannot link to camel-base-engine).
_Claude Code on behalf of allthingssecurity_
##########
core/camel-api/src/main/java/org/apache/camel/spi/RoutesLoader.java:
##########
@@ -124,6 +126,10 @@ default Set<String> updateRoutes(Resource... resources)
throws Exception {
* If a route is loaded with a route id for an existing route, then the
existing route is stopped and remove, so it
* can be updated.
*
+ * The default implementation runs concurrent calls of the {@code
updateRoutes} methods one at a time, so they can
Review Comment:
Reworded in 3b5a3772f468: the Javadoc now names Camel's
`DefaultRoutesLoader` instead of "the default implementation" (as plain
`{@code}`, since camel-api cannot link to camel-base-engine).
_Claude Code on behalf of allthingssecurity_
##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoutesLoader.java:
##########
@@ -292,6 +297,16 @@ public Set<String> updateRoutes(Collection<Resource>
resources) throws Exception
return answer;
}
+ updateLock.lock();
Review Comment:
Done in 3b5a3772f468: `updateLock.lockInterruptibly()`. `updateRoutes`
already declares `throws Exception`, so a thread waiting for the lock now ends
with `InterruptedException` when interrupted, for example on shutdown.
_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]