Changing certain global flags requires a restart of open-ils.circ service

Bug #1915645 reported by Jason Stephenson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

Evergreen version: 2.2.0+
OpenSRF version: N/A
PostgreSQL version: N/A

Since Evergreen release 2.2.0, Circulate.pm has cached the value of the circ.opac_renewal.use_original_circ_lib global flag indefinitely.

The circ.desk_renewal.use_original_circ_lib global flag has been cached since it was introduced in release 2.5.0.

The caching works as follows:

The Circulate.pm file has two global variables, one for each flag. The first time that a drone processes a renewal, these variables will be undefined. When the variables are undefined, the values of the flags will be retrieved from the database and stored in the variables. All future renewals processed by the same open-ils.circ drone will use the values of the flags when they were first retrieved.

Because this caching lasts for the lifetime of a running drone, drones will not see changes in the values of these flags. If either or both flags are changed without restarting the open-ils.circ service on all bricks. This could lead to situations where different drones have different values for these flags. This would cause different behavior with renewals, even from the same workstation.

It could also lead to the erroneous assumption that these flags do not work when testing their effects on renewals without restarting circulation services after changing either flag.

I could find no mentions of the circ.opac_renewal.use_original_circ_lib in the Evergreen 2.2 release notes. The release notes for 2.5.0 do mention the circ.desk_renewal.use_original_circ_lib, but does not mention that one should restart open-ils.circ services after changing this flag.

I understand that the caching is an intentional performance improvement. Since these flags change rarely, if ever, in a production environment, it makes a lot of sense to cache these values in order to reduce the number of database look ups performed per renewal.

This caching should either be documented or some method of invalidating these values in running drones should be implemented.

description: updated
description: updated
Galen Charlton (gmc)
tags: added: caching
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.