From 1df7a1800a8cc52ae2d1bec8a76b69008eb320da Mon Sep 17 00:00:00 2001 From: Albert Louis Rossi Date: Thu, 5 Oct 2023 07:17:04 -0500 Subject: [PATCH] dcache-bulk: cancel activity future on target cancel Motivation: Neglected to cancel the future of the activity of a task running inside the container (instead of just the task future and the target object). Modification: Add cancellation. Result: Correct cancellation semantics. Target: master Request: 9.2 Requires-notes: yes Patch: https://rb.dcache.org/r/14121/ Acked-by: Dmitry --- .../org/dcache/services/bulk/job/BulkRequestContainerJob.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/job/BulkRequestContainerJob.java b/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/job/BulkRequestContainerJob.java index e21abef7488..b1444ab34b2 100644 --- a/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/job/BulkRequestContainerJob.java +++ b/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/job/BulkRequestContainerJob.java @@ -379,6 +379,10 @@ class TargetTask extends ContainerTask { } void cancel() { + if (activityFuture != null) { + activityFuture.cancel(true); + } + if (target != null) { activity.cancel(target); }