DESCRIPTION

JVMCBC-380: Disable pipelining for HTTP services.

Motivation
----------
In forum posts as well as other tickets it has been discovered that
the implicit pipelining netty/core-io uses doesn't work well with
the go implementation of pipelining in http 1.1. In fact, it doesn't
work at all and leads to all kinds of weird issues, especially
prematurely aborted (n1ql) requests that return 0 as the result count.

As a result, we need to disable pipelining for HTTP based services,
but for performance reasons keep it for binary ops.

Modifications
-------------
This change adds a short-circuit statement to the AbstractGenericHandler
which, if the endpoint is set to "pipeline" keeps going forward but
otherwise checks if a request is already in-flight and if so it sends
it into the usual retry-or-cancel circle.

Note that in-flight can either mean outstanding requests in the queue
but also currently processing/decoding one which has already been
taken out of the request queue.

Each endpoint is modified to pass in a true/false flag if pipelining
should be enabled for it. Tests have been modified to take that flag
into account and also for each endpoint suitable regression tests
have been added to make sure we don't start pipelining in the future.

Result
------
Pipelining is now for all HTTP-based endpoints disabled. This also
includes the VIEW service which is erlang based and is not known
to cause issues here, but lets keep it consistent.

Change-Id: Ie50f62fb3f90dc5c9305e25483995af534796529
Reviewed-on: http://review.couchbase.org/71795
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Cory Peck xxx@xxx.xxx
Reviewed-on: http://review.couchbase.org/71962


COMMENTS

author: Gerrit Code Review
date: 2017-01-13 07:13:21.998000000

Change has been successfully cherry-picked as 4f924708d8649d3934639d2a545777c7b45ee0ca by Natasha Sullivan

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