DESCRIPTION

JCBC-461: Limit the netty worker count for streaming conns.

Motivation
----------
Under normal circumstances, netty should create worker threads on the fly
and since the client only uses one channel for the bucket streaming connection,
there should every only one be used.

Under failure conditions, it could be the case that many more threads
are created falsely.

Modifications
-------------
The worker count is held to one thread only, since only one channel needs
ever to be accessed.

Result
------
Providing a hard upper limit for worker threads prevents thread exhaustion.

Change-Id: Idb285bc794c190b876e63383d1eff690ba57d9ba


COMMENTS

author: Natasha Sullivan
date: 2014-06-02 16:21:05.651000000

Patch Set 2: Commit message was updated

-------------------------------------
author: Natasha Sullivan
date: 2014-06-02 16:22:39.888000000

Patch Set 2:

If it's stuck then no streaming config would go through either and we would be in problems anyway.

Interestingly, we could still end up with lots of channels since netty multiplexes it across this thread.

Also, if we run into issues we are completely blowing up the handler anyway and getting a new one - this is not the nicest way to do it but I think this of more as a safety net here. I think it should be good - but of course we run it through QE anyway.

-------------------------------------
author: Natasha Sullivan
date: 2014-06-02 16:24:42.999000000

Patch Set 2: Verified+1 Code-Review+2

-------------------------------------
