Ticket 49768 - Under network intensive load persistent search can erronously decrease connection refcnt
If a connection enters in turbo mode (because of high traffic) or
a worker reads several requests in the read buffer (more_data), the thread
keeps processing connection.
In that condition it should not decrease the refcnt.
In case the operation is a persistent search, it decreases systematically
So refcnt can become lower than the actual number of threads active on the connection.
Most of the time it can create messages like
Attempt to release connection that is not acquired
In some rare case, if the a connection is out of the active list but a remaining thread
tries to remove it again it can lead to a crash
The fix consist, when processing a PS, to decrease the refcnt at the condition
the connection is not in turbo mode or in more_data.
Reviewed by: Mark Reynolds
Platforms tested: F26
Flag Day: no
Doc impact: no