From d0c6c2566c9f9845b6a8a5379b6ad0fc7c03210b Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Tue, 5 Nov 2024 11:11:41 +0100 Subject: [PATCH] bulk/qos: shutdown executor services when stopped 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 (cherry picked from commit 5f67bddf57ddc6c21e28081509e08305396fd70b) Signed-off-by: Tigran Mkrtchyan --- .../dcache/services/bulk/manager/ConcurrentRequestManager.java | 1 + .../src/main/resources/org/dcache/services/bulk/bulk.xml | 2 +- .../src/main/resources/org/dcache/qos/qos-adjuster.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/manager/ConcurrentRequestManager.java b/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/manager/ConcurrentRequestManager.java index aa7808a04c3..71bba5998ef 100644 --- a/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/manager/ConcurrentRequestManager.java +++ b/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/manager/ConcurrentRequestManager.java @@ -405,6 +405,7 @@ public void shutdown() throws Exception { if (processorFuture != null) { processorFuture.cancel(true); } + processorExecutorService.shutdown(); requestJobs = null; cancelledTargets = null; requestStore.clearCache(); diff --git a/modules/dcache-bulk/src/main/resources/org/dcache/services/bulk/bulk.xml b/modules/dcache-bulk/src/main/resources/org/dcache/services/bulk/bulk.xml index 3635b42f18a..a1b5749835f 100644 --- a/modules/dcache-bulk/src/main/resources/org/dcache/services/bulk/bulk.xml +++ b/modules/dcache-bulk/src/main/resources/org/dcache/services/bulk/bulk.xml @@ -262,7 +262,7 @@ - + Core of the service which manages the request and target job lifecycle. diff --git a/modules/dcache-qos/src/main/resources/org/dcache/qos/qos-adjuster.xml b/modules/dcache-qos/src/main/resources/org/dcache/qos/qos-adjuster.xml index beab8b448d4..b63015df6e8 100644 --- a/modules/dcache-qos/src/main/resources/org/dcache/qos/qos-adjuster.xml +++ b/modules/dcache-qos/src/main/resources/org/dcache/qos/qos-adjuster.xml @@ -67,7 +67,7 @@ Preserves the QOS session id generated for the task. - +