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


COMMENTS

author: Natasha Sullivan
date: 2017-01-10 12:43:50.292000000

Uploaded patch set 2.

-------------------------------------
author: Gerrit Code Review
date: 2017-01-11 04:47:22.315000000

Change has been successfully cherry-picked as 711afb196388f7bf9f4f3ee97695e0e74f0800a7 by Natasha Sullivan

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