stock A/T filter for hold_request.shelf_expires_soon hook is too broad

Bug #1326983 reported by Galen Charlton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
2.5
Fix Released
Low
Unassigned

Bug Description

The stock action/trigger selection filter for the hold_request.shelf_expires_soon hook does not exclude fulfilled holds. As a consequence, in a large database that has many fulfilled holds, action_trigger_runner.pl can end up trying to retrieve a list of hold IDs that is much larger than necessary.

This manifested as open-ils.cstore backends that consumed CPUs spinning on the following queries:

open-ils.cstore open-ils.cstore.direct.action.hold_request.id_list {"shelf_expire_time":{"<=":"2014-06-06 16:25:14+0000"},"shelf_time":{"!=":null},"cancel_time":null,"capture_time":{"!=":null},"pickup_lib":{"in":{"from":"aou","select":{"aou":[{"transform":"actor.org_unit_descendants","result_field":"id","column":"id"}]},"where":{"id":1}}},"-and":[{"+atev":{"id":null}}],"current_copy":{"!=":null}},{"join":{"atev":{"fkey":"id","filter":{"event_def":7},"type":"left","field":"target"}}}

Even without that happening, running fulfilled holds through the HoldIsAvailable validator wastes time.

Evergreen master

Galen Charlton (gmc)
Changed in evergreen:
importance: Undecided → Critical
importance: Critical → Low
milestone: none → 2.6.2
Revision history for this message
Galen Charlton (gmc) wrote :

A patch is available in the user/gmcharlt/lp1326983_better_shelf_expires_soon_filtering branch of the working/Evergreen repository:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/gmcharlt/lp1326983_better_shelf_expires_soon_filtering

tags: added: holds pullrequest
Revision history for this message
Ben Shum (bshum) wrote :

Apparently we've had this on our utility server at least since Jan 2013.

Picked to master, rel_2_6 and rel_2_5, thanks Galen!

Special note for the next maintenance release to include a mention of this bug fix for folks upgrading because action_trigger_filters.json.example is not written to the live file automatically.

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
milestone: 2.6.3 → 2.6.2
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.