]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1653742 Copy tree authoritative API share cstores
authorBill Erickson <berickxx@gmail.com>
Tue, 3 Jan 2017 16:59:26 +0000 (11:59 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 10 Feb 2017 22:26:40 +0000 (17:26 -0500)
commitabdb8f289159a01a62b8422732e28d635c136817
tree9c2917a364e1e2a2e751413ed6564051c2d96f8d
parent0830611fec2a055209759a17fc42ef24ba5499d9
LP#1653742 Copy tree authoritative API share cstores

Avoid opening one cstore connection per requested org unit in the
open-ils.cat.asset.copy_tree.retrieve.authoritative API by creating a
single shared cstore connection at the top of the API shared by all
API actions.

To test:

1. In one terminal:

% tail osrfsys.log | grep transaction.begin

2. In another terminal:

srfsh% request open-ils.cat
open-ils.cat.asset.copy_tree.retrieve.authoritative "AUTOTOKEN", 217,
[1,2,3,4,5,6,7,8,9]

3. 9 cstore transactions are opened before patching.  After patching,
only 1 is created.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm