Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache-bulk: fix missing pnfsid on cancel of PIN/STAGE
Motivation: The "prestore" option on bulk requests is there to allow greater throughput by fetching file attributes for targets lazily rather than at the moment of request submission. This means that without prestore, file targets of the request will not have, among other things, their pnfsid defined or stored in the database. (This does not apply to "discovered" paths, i.e., through directory recursion, as the directory listing automatically provides the extra attributes.) This situation, however, means than if the target is cancelled, its pnfsid will not be available; this is only important for the PIN/STAGE activities, since they attempt to issue an unpin request, and that message requires a pnfsid. Issuing a cancel request on a PIN request not marked with `-prestore=true` will in fact raise an NPE because of the precondition check in the unpin message constructor; and this in turn leaves the original request stuck in the CANCELLING state. Modification: In the case of cancel, fetch the missing pnfsid. As stated in the GitHub issue, the throughput considerations can be ignored in this case. Result: Cancellation of PIN requests which were not marked with `-prestore=true` no longer fail to complete, and the unpin request successfully arrives at PinManager. Target: master Request: 8.2 Patch: https://rb.dcache.org/r/13715/ Closes: #6823 Bug: #6823 Requires-notes: yes Requires-book: no Acked-by: Tigran
- Loading branch information