Deleting patrons can exceed staff client timeouts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned | ||
3.0 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
It's possible for patrons with a large number of circulations and other related things to cause postgres to take to long to get results back to the OpenSRF call.
The logs show this:
open-ils.
The subsequent query is:
select from actor.usr_
That query will do many things. One of which is calling:
perform actor.usr_
which eventually calls
DELETE FROM action.circulation WHERE usr = src_usr;
followed by
BEFORE DELETE
ON action.circulation
FOR EACH ROW
EXECUTE PROCEDURE action.
There is a slowness here. I executed explain analyze DELETE FROM action.circulation WHERE usr = TESTUSERID;
and I found that
Trigger for constraint usr_circ_
Took the lions share of the time. This lead me to create and index
CREATE INDEX action_
ON action.
USING btree
(source_circ);
And viola - the same explain analyze
Trigger for constraint usr_circ_
Branch soon.
Changed in evergreen: | |
milestone: | none → 3.1.1 |
status: | New → Confirmed |
Changed in evergreen: | |
milestone: | 3.1.1 → 3.1.2 |
Changed in evergreen: | |
milestone: | 3.1.2 → 3.1.3 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ blake/LP1758160 _Deleting_ patrons_ can_exceed_ staff_client_ timeouts