[open-ils-commits] [GIT] Evergreen ILS branch master updated. bb9225c7164cd485068eeca0a96b913dbcc4856f
Evergreen Git
git at git.evergreen-ils.org
Wed May 17 13:18:47 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via bb9225c7164cd485068eeca0a96b913dbcc4856f (commit)
via 2565c2c808b4b15efa17b1fd1745426e84e6bb15 (commit)
from 89f763b5c92314b9a8db8024e0680f3808e99117 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bb9225c7164cd485068eeca0a96b913dbcc4856f
Author: Bill Erickson <berickxx at gmail.com>
Date: Wed May 17 13:14:17 2017 -0400
LP#1673799 Stamping EDI query SQL update
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index febaca1..c8f3419 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -90,7 +90,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1039', :eg_version); -- jeffdavis/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1040', :eg_version); --gmcharlt/berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.index_edi_message_remote_file.sql b/Open-ILS/src/sql/Pg/upgrade/1040.schema.index_edi_message_remote_file.sql
similarity index 62%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.index_edi_message_remote_file.sql
rename to Open-ILS/src/sql/Pg/upgrade/1040.schema.index_edi_message_remote_file.sql
index 4169161..1395573 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.index_edi_message_remote_file.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1040.schema.index_edi_message_remote_file.sql
@@ -1,6 +1,6 @@
BEGIN;
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1040', :eg_version);
CREATE INDEX edi_message_remote_file_idx ON acq.edi_message (evergreen.lowercase(remote_file));
commit 2565c2c808b4b15efa17b1fd1745426e84e6bb15
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Fri Mar 17 11:47:46 2017 -0400
LP#1673799: new acqedim index to speed up duplicate file check
This patch adds a new index on acq.edi_message to speed up
the check for duplicate EDI messages that edi_fetcher.pl runs,
replacing use of "ilike" with invocations of the evergreen.lowercase()
stored procedure.
To test
-------
[1] Arrange to create or simulate an EDI message that failed
processing.
[2] Run edi_fetcher.pl to have it attempt to download the
failed message in step #1; verify that the file is
/not/ downloaded again and that no additonal acq.edi_message
rows are created for it.
[3] (Extra credit) Try steps 1 and 2 in a database that has a
very large number of rows in acq.edi_message.
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm
index 8676a6b..49feb96 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm
@@ -135,7 +135,10 @@ sub retrieve_core {
password => $account->password,
in_dir => $account->in_dir
},
- remote_file => {ilike => $remote_file},
+ remote_file => {'=' => {
+ transform => 'evergreen.lowercase',
+ value => ['evergreen.lowercase', $remote_file]
+ }},
status => {'in' => [qw/ processed proc_error trans_error /]},
},
{ join => {"acqedi" => {}}, limit => 1 }
diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index 309e80f..6391e68 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -786,6 +786,7 @@ CREATE TABLE acq.edi_message (
);
CREATE INDEX edi_message_account_status_idx ON acq.edi_message (account,status);
CREATE INDEX edi_message_po_idx ON acq.edi_message (purchase_order);
+CREATE INDEX edi_message_remote_file_idx ON acq.edi_message (evergreen.lowercase(remote_file));
-- Note below that the primary key is NOT a SERIAL type. We will periodically truncate and rebuild
-- the table, assigning ids programmatically instead of using a sequence.
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.index_edi_message_remote_file.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.index_edi_message_remote_file.sql
new file mode 100644
index 0000000..4169161
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.index_edi_message_remote_file.sql
@@ -0,0 +1,7 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE INDEX edi_message_remote_file_idx ON acq.edi_message (evergreen.lowercase(remote_file));
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Acq/EDI.pm | 5 ++++-
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/200.schema.acq.sql | 1 +
.../1040.schema.index_edi_message_remote_file.sql | 7 +++++++
4 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/1040.schema.index_edi_message_remote_file.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list