From: Bill Erickson Date: Thu, 23 May 2019 15:16:50 +0000 (+0000) Subject: JBAS-2285 authority reginest improvements X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=77741f8dd70e99bee7588143487a91d8cb14dbb6;p=working%2FEvergreen.git JBAS-2285 authority reginest improvements Signed-off-by: Bill Erickson --- diff --git a/KCLS/sql/schema/deploy/3.2-additions.sql b/KCLS/sql/schema/deploy/3.2-additions.sql index c4f8e18209..7c0f697eeb 100644 --- a/KCLS/sql/schema/deploy/3.2-additions.sql +++ b/KCLS/sql/schema/deploy/3.2-additions.sql @@ -211,9 +211,12 @@ SELECT CLOCK_TIMESTAMP(), 'Done rebuilding reporter.materialized_simple_record.. */ -BEGIN; SELECT CLOCK_TIMESTAMP(), 'Reingesting authority records'; +BEGIN; +-- wrap the setup in a transaction so the script will die of something +-- in here fails. Then run main reingest sans transaction. + -- add the flag ingest.disable_authority_full_rec if it does not exist INSERT INTO config.internal_flag (name, enabled) SELECT 'ingest.disable_authority_full_rec', FALSE @@ -237,6 +240,10 @@ WHERE name in ( 'ingest.disable_authority_full_rec' ); +COMMIT; + +-- execute the main reingest outside of a transaction + ALTER TABLE authority.record_entry DISABLE TRIGGER a_marcxml_is_well_formed; ALTER TABLE authority.record_entry DISABLE TRIGGER b_maintain_901; ALTER TABLE authority.record_entry DISABLE TRIGGER c_maintain_control_numbers; @@ -256,5 +263,4 @@ FROM internal_flag_state b WHERE a.name = b.name; SELECT CLOCK_TIMESTAMP(), 'Done reingesting authority records'; -COMMIT;