Skip to content

Commit

Permalink
bulk/qos: shutdown executor services when stopped
Browse files Browse the repository at this point in the history
Motivation:
As scheduled executors are not shutdown cleanly, when dcache stops
running threads logged.

Modification:
shutdown ConcurrentRequestManager and adjuster-executor when dcache
stopped.

Result:

less stack traces in logs.

Acked-by: Lea Morschel
Target: master, 10.2
Require-book: no
Require-notes: yes
  • Loading branch information
kofemann committed Nov 5, 2024
1 parent e98ab94 commit 5f67bdd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ public void shutdown() throws Exception {
if (processorFuture != null) {
processorFuture.cancel(true);
}
processorExecutorService.shutdown();
requestJobs = null;
cancelledTargets = null;
requestStore.clearCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
<property name="requestStore" ref="request-store"/>
</bean>

<bean id="request-manager" class="org.dcache.services.bulk.manager.ConcurrentRequestManager">
<bean id="request-manager" class="org.dcache.services.bulk.manager.ConcurrentRequestManager" destroy-method="shutdown">
<description>Core of the service which manages the request and target job lifecycle.</description>
<property name="statistics" ref="statistics"/>
<property name="targetStore" ref="target-store"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<bean id="adjuster-executor" class="org.dcache.util.CDCExecutorServiceDecorator">
<description>Preserves the QOS session id generated for the task.</description>
<constructor-arg>
<bean class="org.dcache.util.BoundedCachedExecutor">
<bean class="org.dcache.util.BoundedCachedExecutor" destroy-method="shutdown">
<constructor-arg value="${qos.limits.adjuster.submit-threads}"/>
</bean>
</constructor-arg>
Expand Down

0 comments on commit 5f67bdd

Please sign in to comment.