dCache/dcache — pull request #1001 by gbehrmann (2014-10-29 09:23:05+00:00)
Title: pnfsmanager: Controlled shutdown of processing threads

PNFS manager's processing threads currently rely on cells automatically killing
threads with an interrupt if the cell fails to shut them down. This presents
two problems: One is that it makes cell shutdown slower (unfortunate, but not
critical); the other is that it means the processing threads run after the
database connection pool has been closed (worse as it causes partial processing
of requests and quite some noise in the logs).

This patch reworks the PNFS manager shutdown to explicitly shut down the
processing threads. Queued requests are rejected by returning a
NoRouteToCellException to the requestor. The currently being processed requests
are allowed to finish (although they only get half a second to do so).

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Paul Millar
Patch: https://rb.dcache.org/r/7383/
(cherry picked from commit 6919e2645f844f1681f9181ad0272b34f6ead547)