Autogen does not refresh unlocalized org tree cache

Bug #1786987 reported by Jeff Davis on 2018-08-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Critical
Unassigned
3.0
Undecided
Unassigned
3.1
Undecided
Unassigned

Bug Description

The org tree is stored in memcached separately for each locale: "orgtree.en-US", "orgtree.en-CA", etc. When the org tree is updated, running autogen deletes all the cached localized orgtree values, forcing them to be refreshed.

However, the orgtree is also stored in memcached in a non-localized form with "orgtree." as the cache key (e.g. when AppUtils->get_org_tree() is called without a locale param). This non-localized form does not get updated when autogen is run and therefore remains out-of-date.

We should be able to fix this problem by modifying the org_tree_js() function in OpenILS::Utils::Configure so that it removes "orgtree." from the cache along with the locale-specific orgtree values.

(Sitka ran into this issue after adding a new org unit. System-wide non-staff searches began failing with a query error: Can't call method "opac_visible" on an undefined value at /usr/local/share/perl/5.18.2/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm line 1177. QP grabs your search org's descendants from the database, then looks up each one in the cached non-localized orgtree -- but since autogen doesn't update the cached orgtree, looking up the new org unit produces an error. Manually removing the stale "orgtree." value from memcached worked, but is not a permanent solution.)

Changed in evergreen:
importance: Undecided → Critical
milestone: none → 3.2-rc
Bill Erickson (berick) on 2018-09-26
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
status: New → Confirmed
Bill Erickson (berick) wrote :

Issue and fix confirmed. Code pushed to 3.0 and up w/ slight modification to move 'my $cache' up a few lines for compilation happiness. Thanks Mike, Jeff.

Changed in evergreen:
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed
Bill Erickson (berick) on 2018-09-26
Changed in evergreen:
milestone: 3.2-rc → 3.2.0
status: Confirmed → Fix Committed
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers