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)
committerMike Rylander <mrylander@gmail.com>
Fri, 4 Jan 2019 19:06:37 +0000 (14:06 -0500)
commitefa9b713d5341458a3afaa26d1cf9e750fa78654
treec4d0094ca44731a58b905eab490dfff893f12086
parent848843b1cda6d79d3aec589746abf7a8efdc313d
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>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
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