Add logging to ThreadHandler when cancelling threads 31/142131/2
authordanielhanrahan <daniel.hanrahan@est.tech>
Sat, 27 Sep 2025 10:07:21 +0000 (11:07 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Sat, 27 Sep 2025 13:20:47 +0000 (14:20 +0100)
Issue-ID: POLICY-5458
Change-Id: I24e38efc8220db0094111a2ed196b0e1bc47c171
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ThreadHandler.java

index 45b2488..29377a9 100644 (file)
@@ -72,6 +72,8 @@ public class ThreadHandler implements Closeable {
         this.cacheProvider = cacheProvider;
         executor = Context.taskWrapping(Executors.newFixedThreadPool(
                 parameters.getIntermediaryParameters().getThreadPoolSize()));
+        LOGGER.info("ThreadHandler started with thread pool size {}",
+                parameters.getIntermediaryParameters().getThreadPoolSize());
     }
 
     /**
@@ -244,6 +246,8 @@ public class ThreadHandler implements Closeable {
         var process = executionMap.get(execIdentificationId);
         if (process != null) {
             if (!process.isDone()) {
+                LOGGER.warn("ThreadHandler cancelling previous thread for execIdentificationId={} messageId={}",
+                        execIdentificationId, messageId);
                 process.cancel(true);
             }
             executionMap.remove(execIdentificationId);