-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache-bulk,dcache-qos: repair mass cancellation issues
Motivation: The latest modifications (9.2 and master) created a regression in how bulk request cancellation is handled. The symptoms present themselves under two guises: - cancellation stalls and requires a second cancellation to complete; this is not always successful in cancelling all the requests in question. - cancellation en masse provokes a large number of timeout failures from QoS because of message congestion and response time. Modifications: The second problem seems to be solved fairly easily by increasing a few default message timeouts from 1 to 5 minutes (both bulk and qos). These are reset by this patch. The first problem has been addressed as follows: 1. `checkForRequestCancellation()` has been added in a number positions (some accidentally eliminated from earlier versions) allowing ongoing operations to be short-circuited. This includes any writing of state to the database. 2. The update of the database entries to CANCELLED is now done before (rather than after) the attempt to cancel in-flight activities; since we now short-circuit writing of state after completion on cancelled targets. Discovered targets which have not yet been stored should be ignored. In addition to these changes, this patch also includes: - A refactoring of the handling of RuntimeExceptions which makes for clearer code and which does not throw or catch Throwable. - Correction of an error in `handleCompletion` where `cancel` is called on the ContainerTask instead the container itself. - A minor refactoring of the `checkForRequestCancellation` method. - Elimination of redundant iterator remove() in one cancellation method. Result: Mass cancellation of all running requests now finishes correctly. (Note that there may be a tail of operations still being cancelled by the `QoSEngine` thereafter, but everything eventually settles out.) Both non-recursive and recursive requests were tested. Target: master Request: 9.2 Patch: https://rb.dcache.org/r/14169 Requires-notes: yes (Fixes cancellation bugs in Bulk) Acked-by: Tigran
- Loading branch information
1 parent
4bed61a
commit 3a255bb
Showing
4 changed files
with
96 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters