Make authority_control_fields.pl resistant to database timeouts
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Apr 2011 14:13:22 +0000 (14:13 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Apr 2011 14:13:22 +0000 (14:13 +0000)
commitc10bc69714b2410e9f96d9cefa550b85f7999cda
treef1e17642c444c5241847dde7d8a11b44520a2102
parent5e4c8b4a1c6a1126f75816ccdb32d465c4a5d88f
Make authority_control_fields.pl resistant to database timeouts

LP 771237 describes how on an underpowered system, the work that
authority_control_fields.pl tries to do on a per-record basis may hit the
CStore default timeout of 6 seconds for a transaction and automatically
end the transaction, resulting in no work being committed once the script tries
to update the bibliographic record. Searching each controlled field for a
matching authority record can be costly in a database with millions of
authority records.

To enable the script to accomplish its work on underpowered test systems, use a
regular read-only CStoreEditor session to accomplish the lookups and create a
separate CStoreEditor session to issue the update in a transaction if required.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@20312 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/support-scripts/authority_control_fields.pl