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)
committerBill Erickson <berickxx@gmail.com>
Thu, 27 Dec 2018 15:35:39 +0000 (10:35 -0500)
commit53b35d28b40fc9f0a3cf956c0d0fa7933a99e787
treec4d0094ca44731a58b905eab490dfff893f12086
parent67c4b38b1896fa333a9d10aa03271859f92aedf3
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>
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