LP#1729610: return new OpenSRF status if backlog queue fills up
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 7 Nov 2018 17:03:17 +0000 (12:03 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 11 Dec 2018 18:25:15 +0000 (13:25 -0500)
commite4c4b5585f5dd9b5e97112555546a781a0c7505c
tree81e3d9b28749052b47d2a111fdcfb7d812fe5800
parentf7e926816fd0fd594bb9aa39fe4588175ccd49b2
LP#1729610: return new OpenSRF status if backlog queue fills up

This patch teaches Perl services how to return a new OpenSRF status,
OSRF_STATUS_SERVICEUNAVAILABLE (code 503) if the backlog queue
for a service gets full.

To test
-------
[1] Set a low max_backlog_queue for opensrf.sloooow and a low
    max_children.
[2] Arrange for srfsh to fire off a bunch of opensrf.sloooow.wait
    requests.
[3] Verify that requests that come in after the backlog queue fills
    up immediately get 503 exceptions.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
include/opensrf/osrf_message.h
src/javascript/opensrf.js
src/perl/lib/OpenSRF/DomainObject/oilsResponse.pm
src/perl/lib/OpenSRF/Server.pm
src/python/osrf/const.py