Make authority_control_fields.pl resistant to database timeouts
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Apr 2011 14:13:55 +0000 (14:13 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Apr 2011 14:13:55 +0000 (14:13 +0000)
commit9ec65edd58afa44ddfbcf0873db46dd2e94a1d37
tree84785298d42cd94e4c18a6b27877ff2ccf8447dd
parent3e67e0f4ec22c07f3656cdf0f87c5d13b451d80f
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_0@20313 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/support-scripts/authority_control_fields.pl