LP#1653001 Hold details authoritative API cstore maintenance
authorBill Erickson <berickxx@gmail.com>
Fri, 30 Dec 2016 16:54:08 +0000 (11:54 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 1 Mar 2017 15:08:13 +0000 (10:08 -0500)
commit8e0bf85f8453c4b046815efd08d1a561494a3ce1
tree7ea46a72b10c33fecd3c46422f5d69fe6cce2ce4
parent512dd0c5be9a460a187a524a314b2e4c15edcc0b
LP#1653001 Hold details authoritative API cstore maintenance

Avoid cstore exhaustion during .authorative API calls that run
Holds:retrieve_hold_queue_status_impl() by using the in-transaction
editor for YAOUS lookups instead of allowing the lookups to create their
own cstore connections, each spawning a new transaction, since
CStoreEditor is in authoritative mode.

Since CStoreEditor authoritative handling leaves each cstore transaction
open until the API call completes, and in this case, each hold in the batch
lookup resulted in 2 additional open cstore connections per hold, a batch
lookup of (say) 15 holds, meant 31 cstore connections were opened in one API
call.

Telling the YAOUS lookup to use the existing editor means the same call
completes with 1 cstore connection.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm