Autogen does not refresh unlocalized org tree cache

Bug #1786987 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Critical
Unassigned
3.0
Fix Released
Undecided
Unassigned
3.1
Fix Released
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.)

Tags: pullrequest
Revision history for this message
Mike Rylander (mrylander) wrote :
tags: added: pullrequest
Changed in evergreen:
importance: Undecided → Critical
milestone: none → 3.2-rc
Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
status: New → Confirmed
Revision history for this message
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)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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