lp:opensrf

Created by OpenSRF Project Leads on 2011-10-18 and last modified on 2019-06-07
Get this branch:
bzr branch lp:opensrf

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
OpenSRF Project Leads
Project:
OpenSRF
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.evergreen-ils.org/OpenSRF.git.

The next import is scheduled to run in 24 minutes.

Last successful import was 5 hours ago.

Import started 5 hours ago on alnitak and finished 5 hours ago taking 15 seconds — see the log
Import started 11 hours ago on izar and finished 11 hours ago taking 20 seconds — see the log
Import started 17 hours ago on izar and finished 17 hours ago taking 20 seconds — see the log
Import started 23 hours ago on alnitak and finished 23 hours ago taking 25 seconds — see the log
Import started on 2019-07-19 on alnitak and finished on 2019-07-19 taking 20 seconds — see the log
Import started on 2019-07-19 on izar and finished on 2019-07-19 taking 15 seconds — see the log
Import started on 2019-07-18 on alnitak and finished on 2019-07-18 taking 20 seconds — see the log
Import started on 2019-07-18 on izar and finished on 2019-07-18 taking 15 seconds — see the log
Import started on 2019-07-18 on alnitak and finished on 2019-07-18 taking 20 seconds — see the log
Import started on 2019-07-18 on alnitak and finished on 2019-07-18 taking 20 seconds — see the log

Recent revisions

2225. By John Merriam on 2019-06-07

LP#1824184: Change potentially slow log statements to subroutines

The OpenSRF code was searched for potentially slow logging statements at
log level info or above. We then changed those logging statements to be
delayed execution subroutines. This is in reaction to LP1823338 where a
slow debug logging statement was slowing down SIP checkins even though
debug logging was not turned on.

Here is some pseudocode that shows what is being done here:

$log->debug("Some text " . $some->slow_method);

would be changed to:

$log->debug(sub{return "Some text " . $some->slow_method });

With this change, an unnamed sub is passed to the OpenSRF logger module
and it will not be executed unless the global logging level is set to
debug or higher (the slow_method will not be called unless it is needed
for that logging level).

********
If/when this is committed, please use delayed execution subroutines for
any logging statements that could be slow in the future. It is recommend
that any logging statements that do not consist entirely of quoted text
and/or already available scalar variables use delayed execution
subroutines.
********

Testing notes
-------------
[1] This patch reduced the duration of open-ils.storage.actor.user.total_owed
    calls on a test system from an average of 0.13 seconds to an overage
    of 0.009 seconds.
[2] It didn't materially affect the duration of calls to
    open-ils.actor.user.opac.vital_stats.
[3] This make sense: open-ils.storage has far more generated methods
    than open-ils.actor.
[4] There are enough instances in Evergreen of using method_lookup to find
    routines in open-ils.storage that the speed improvement may well be
    perceptible to humans, not just SIP sorters.

Signed-off-by: John Merriam <email address hidden>
Signed-off-by: Galen Charlton <email address hidden>

2224. By Galen Charlton on 2019-06-07

LP#1824181: add test cases

To test
-------
[1] Verify that 'make check' (or prove src/perl/t/09-Utils-Logger.t)
    passes.

Signed-off-by: Galen Charlton <email address hidden>

2223. By John Merriam on 2019-06-07

LP#1824181: Allow 1st arg to logger to be string or subroutine

This simple change allows the $msg passed to _log_message in Logger.pm
to be either a regular string or a delayed exec subroutine. This is in
reaction to LP1823338 where a slow debug logging statement was slowing
down SIP checkins even though debug logging was not turned on.

With this change you can take this:

$log->debug("Available methods\n\t".join("\n\t", keys %{ $_METHODS[$proto] }), INTERNAL);

and change it to this:

$log->debug(sub{return "Available methods\n\t".join("\n\t", keys %{ $_METHODS[$proto] }) }, INTERNAL);

and then that slow debug logging line will not be executed unless
debug logging is turned on.

Signed-off-by: John Merriam <email address hidden>
Signed-off-by: Galen Charlton <email address hidden>

2222. By Jason Stephenson on 2019-02-19

Lp 1808580: Remove Installation Support for Ubuntu 14.04

Remove references to Ubuntu 14.04 from the README and the
Makefile.install prerequisites.

Signed-off-by: Jason Stephenson <email address hidden>
Signed-off-by: Ben Shum <email address hidden>

2221. By Galen Charlton on 2019-01-04

LP#1729610: extend backlog queue to C apps

This patch extends the notion of a backlog queue to C apps and
offers the same functionality as the Perl side of the patch series:

- max_backlog_queue configuration setting
- ability to queue messages up to the configured limit
- ability to drop requests that would overflow the backlog
  queue and send status 503 exceptions back to the client.

This patch also adds a new service, opensrf.cslow, that implements
a opensrf.cslow.wait method similar to the Perl opensrf.slooooooow
service.

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

Signed-off-by: Galen Charlton <email address hidden>
Signed-off-by: Bill Erickson <email address hidden>
Signed-off-by: Mike Rylander <email address hidden>

2220. By Galen Charlton on 2019-01-04

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 <email address hidden>
Signed-off-by: Bill Erickson <email address hidden>
Signed-off-by: Mike Rylander <email address hidden>

2219. By Galen Charlton on 2019-01-04

LP#1729610: make it possible to set max_backlog_queue in opensrf.xml

This patch adds a new service configuration option, max_backlog_queue,
to allow controlling the size of the backlog queue.

If not otherwise specified in opensrf.xml, max_backlog_queue defaults
to 1000.

Signed-off-by: Galen Charlton <email address hidden>
Signed-off-by: Bill Erickson <email address hidden>
Signed-off-by: Mike Rylander <email address hidden>

2218. By Remington Steed on 2019-01-04

LP#1729610: Fix incorrect param description

Mike confirmed that the code expects "pause" to be an integer. This
commit changes the description to reflect that, and to mention the
default value.

Signed-off-by: Remington Steed <email address hidden>
Signed-off-by: Galen Charlton <email address hidden>
Signed-off-by: Bill Erickson <email address hidden>
Signed-off-by: Mike Rylander <email address hidden>

2217. By Mike Rylander on 2019-01-04

LP#1729610: Add some debug/internal logging to backlog queue

Signed-off-by: Mike Rylander <email address hidden>
Signed-off-by: Galen Charlton <email address hidden>
Signed-off-by: Bill Erickson <email address hidden>
Signed-off-by: Mike Rylander <email address hidden>

2216. By Mike Rylander on 2019-01-04

LP#1729610: Add a service useful for testing behavior in slow response conditions

This service, opensrf.slooooooow, offers a opensrf.slooooooow.wait method
that waits for the number of seconds specified in its sole parameter.

Signed-off-by: Mike Rylander <email address hidden>
Signed-off-by: Galen Charlton <email address hidden>
Signed-off-by: Bill Erickson <email address hidden>
Signed-off-by: Mike Rylander <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.