[open-ils-commits] [GIT] Evergreen ILS branch rel_2_10 updated. ab260df4412d0304e9a8ddf87dc0661a24cb2ca4

Evergreen Git git at git.evergreen-ils.org
Fri Jun 10 11:59:07 EDT 2016


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, rel_2_10 has been updated
       via  ab260df4412d0304e9a8ddf87dc0661a24cb2ca4 (commit)
       via  a67bc88d44ce930674b133d3e0c111e5cb614f8f (commit)
      from  03c12181bbe3931f12c329eb35b0de72193f0562 (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 ab260df4412d0304e9a8ddf87dc0661a24cb2ca4
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Fri Jun 10 11:51:41 2016 -0400

    LP#1526858: Stamping upgrade script for faster alhr query
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    
    Conflicts:
    	Open-ILS/src/sql/Pg/002.schema.config.sql

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index fc8f13e..7a011f0 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,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 ('0978', :eg_version); -- gmcharlt/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0981', :eg_version); -- gmcharlt/jlundgren/kmlussier
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql b/Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql
similarity index 82%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql
rename to Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql
index afc83b8..5b84cc2 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); 
+SELECT evergreen.upgrade_deps_block_check('0981', :eg_version); 
 
 CREATE INDEX hold_request_copy_capture_time_idx ON action.hold_request (current_copy,capture_time);
 CREATE INDEX hold_request_open_captured_shelf_lib_idx ON action.hold_request (current_shelf_lib) WHERE capture_time IS NOT NULL AND fulfillment_time IS NULL AND (pickup_lib <> current_shelf_lib);

commit a67bc88d44ce930674b133d3e0c111e5cb614f8f
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Wed Dec 16 11:03:42 2015 -0500

    LP#1526858: speed up queries for shelf-expired holds during checkin
    
    This patch adds indexes on action.hold_request and tweaks
    the definition of the alhr IDL view to more efficiently
    identify holds that can be canceled if the "Clear Holds Shelf"
    checkin modifier is in use.  This can prevent a problem
    where such checkins can time out in very large databases.
    
    The tweaks were created by Jason Etheridge and have been in
    production at a large consortium for some time.
    
    To test
    -------
    [1] With a suitably large database, set up an item that
        is on the holds shelf but has passed its shelf-expiration
        time, then check it in using the "Clear Holds Shelf" modifier.
    [2] The checkin may fail with a "network failure" message due
        the query on the alhr timing out.
    [3] Apply the patch and repeat step 1. This time, the checkin
        should succeed.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Jeanette Lundgren <jlundgren at cwmars.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 499a85e..66f4c60 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -5765,7 +5765,7 @@ SELECT  usr,
 	</class>
 	<class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
 		<oils_persist:source_definition>
-			SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
+			SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL AND current_copy IS NOT NULL AND fulfillment_time IS NULL GROUP BY current_copy)x USING (current_copy, capture_time)
 		</oils_persist:source_definition>
 		<fields oils_persist:primary="id">
 			<field reporter:label="Status" name="status" oils_persist:virtual="true" />
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index 74b2ca4..c79793a 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -430,6 +430,8 @@ CREATE INDEX hold_request_requestor_idx         ON action.hold_request ( request
 CREATE INDEX hold_request_open_idx ON action.hold_request (id) WHERE cancel_time IS NULL AND fulfillment_time IS NULL;
 CREATE INDEX hold_request_current_copy_before_cap_idx ON action.hold_request (current_copy) WHERE capture_time IS NULL AND cancel_time IS NULL;
 CREATE UNIQUE INDEX hold_request_capture_protect_idx ON action.hold_request (current_copy) WHERE current_copy IS NOT NULL AND capture_time IS NOT NULL AND cancel_time IS NULL AND fulfillment_time IS NULL;
+CREATE INDEX hold_request_copy_capture_time_idx ON action.hold_request (current_copy,capture_time);
+CREATE INDEX hold_request_open_captured_shelf_lib_idx ON action.hold_request (current_shelf_lib) WHERE capture_time IS NOT NULL AND fulfillment_time IS NULL AND (pickup_lib <> current_shelf_lib);
 
 
 CREATE TABLE action.hold_request_note (
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql
new file mode 100644
index 0000000..afc83b8
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql
@@ -0,0 +1,8 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); 
+
+CREATE INDEX hold_request_copy_capture_time_idx ON action.hold_request (current_copy,capture_time);
+CREATE INDEX hold_request_open_captured_shelf_lib_idx ON action.hold_request (current_shelf_lib) WHERE capture_time IS NOT NULL AND fulfillment_time IS NULL AND (pickup_lib <> current_shelf_lib);
+
+COMMIT;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/fm_IDL.xml                       |    2 +-
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/090.schema.action.sql          |    2 ++
 .../0981.schema.indexes_for_alhr_queries.sql       |    8 ++++++++
 4 files changed, 12 insertions(+), 2 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list