LP#1653001 Hold details authoritative API cstore maintenance
authorBill Erickson <berickxx@gmail.com>
Fri, 30 Dec 2016 16:54:08 +0000 (11:54 -0500)
committerKathy Lussier <klussier@masslnc.org>
Mon, 6 Mar 2017 20:18:17 +0000 (15:18 -0500)
commit02edc5ca4b6cc1b4f7c03d2faaa18b09ac4764bf
tree22f0f3127d4190eea5d86452104039589f33fff1
parent8d12a5adbfcb7a7be1bdf8bde714ec383b5caa83
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>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm