From 3cd0912aca01a4ef33d24ba714248a1c18a62fea 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 53cd8198fe8..f99aa52c3c2 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 @@ -380,6 +380,10 @@ class TargetTask extends ContainerTask { } void cancel() { + if (activityFuture != null) { + activityFuture.cancel(true); + } + if (target != null) { activity.cancel(target); }