Triggered event log times out for large-data sites
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.8 |
Won't Fix
|
Medium
|
Unassigned | ||
2.9 |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
The reason is that we tried to improve usability by combining all of a user's events into one stream. However, there's just no good way, with current data, to make the queries needed to drive the UI fast.
Current proposal for fix:
1) add 2 new fields to the event definition table: context_user_path and context_ou_path. These will store the path, from the target object, for retrieving the id of the relevant context user and context org -- or, against whom the event occurred, and where (which may be different that the definition owner).
2) add 2 new fields to the event table to record the event-specific instances of the context ou and context user
3) have the "atul" and related IDL-views use /those/ values instead of having to look up hold.usr or circ.usr, and hold.pickup_lib or circ.circ_lib, for the various "usr" and "perm_lib" values.
4) profit
Here's the current query generated:
SELECT "atul".hook, "atul".name, "atul".reactor, "atul".id, "atul".event_def, "atul".add_time, "atul".run_time, "atul".start_time, "atul".update_time, "atul".
SELECT atevdef.hook,
atevdef.name,
atevdef.reactor,
atev.id,
atev.event_def,
atev.add_time,
atev.run_time,
atev.start_time,
atev.update_time,
atev.complete_time,
atev.update_
atev.state,
atev.user_data,
atev.template_
atev.error_output,
atev.async_output,
targ_circ.id AS target_circ,
targ_ahr.id AS target_hold,
COALESCE(
targ_circ.circ_lib,
targ_ahr.
FROM action_
JOIN action_
JOIN action_trigger.hook ath ON (ath.key = atevdef.hook)
LEFT JOIN action.circulation targ_circ ON (ath.core_type = 'circ' AND targ_circ.id = atev.target)
LEFT JOIN action.hold_request targ_ahr ON (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
SELECT value::INTERVAL FROM actor.org_
SELECT '1000 YEARS'::INTERVAL AS value) ous)) AS "atul"
LEFT JOIN action_trigger.hook AS "__core_type_ath" ON ( "__core_
LEFT JOIN action.circulation AS "__AUTO_
LEFT JOIN action.hold_request AS "__AUTO_
LEFT JOIN action.circulation AS "__target_
LEFT JOIN asset.copy AS "__target_
LEFT JOIN asset.call_number AS "__target_
LEFT JOIN biblio.record_entry AS "__target_
LEFT JOIN reporter.
LEFT JOIN action.hold_request AS "__target_
LEFT JOIN asset.copy AS "__target_
LEFT JOIN asset.call_number AS "__target_
LEFT JOIN biblio.record_entry AS "__target_
LEFT JOIN reporter.
LEFT JOIN action.circulation AS "__target_
LEFT JOIN actor.usr AS "__target_
LEFT JOIN actor.card AS "__target_
LEFT JOIN action.circulation AS "__target_
LEFT JOIN asset.copy AS "__target_
LEFT JOIN action.hold_request AS "__target_
LEFT JOIN actor.usr AS "__target_
LEFT JOIN actor.card AS "__target_
WHERE ( ( "__AUTO_
Changed in evergreen: | |
milestone: | none → 3.next |
Changed in evergreen: | |
milestone: | 3.next → none |
Changed in evergreen: | |
assignee: | nobody → Jason Etheridge (phasefx) |
Changed in evergreen: | |
milestone: | none → 3.7-beta |
Changed in evergreen: | |
assignee: | nobody → Jason Stephenson (jstephenson) |
Changed in evergreen: | |
milestone: | 3.7-beta → 3.8-beta |
Changed in evergreen: | |
assignee: | nobody → Chris Sharp (chrissharp123) |
Changed in evergreen: | |
assignee: | Chris Sharp (chrissharp123) → nobody |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Another possible angle of attack is to split the hold and circ UI components into separate tabs, as in the previous interface. This /might/ be enough to address the speed, but I think materializing more state information up front will pay larger rewards in the long run.