dCache/dcache — pull request #476 by gbehrmann (2014-03-25 07:30:33+00:00)
Title: pool: Avoid memory exhaustion problems on write with xrootd and http

The http and xrootd movers use an OrderedMemoryAwayThreadPoolExecutor. This
thread pool limits memory usage per client, however it relies on being able to
estimate the size of the messages in the queue. It knows how to calculate the
size for ChannelBuffer objects, however it doesn't know how to do this for most
other objects. Since we store protocol messages in the queue, the limit doesn't
have the intended effect. The consequence is that a slow disk or full pool can
cause the queue to fill up and trigger OOM.

The patch solves this by moving the ExecutorHandler to the front of the
pipeline such that only ChannelBuffers are stored in the queue.

Target: trunk
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: yes
Require-book: no
Acked-by: Dmitry Litvintsev
Patch: http://rb.dcache.org/r/6796/
(cherry picked from commit 7e6df2048c31c62cbd75b0aac0c1817b048f3faa)