asset.opac_visible_copies is unused and should be removed

Bug #1831803 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned

Bug Description

The asset.opac_visible_copies materialized view exists in current versions of Evergreen, but it's no longer used (I think it was superseded by opac.copy_vis_attr_cache and related developments in EG 3.0). On older Evergreen systems, asset.opac_visible_copies contains stale data; on newer systems, it will be empty. Either way, the view ought to be removed.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Note: asset.opac_visible_copies is used by the search.query_parser_fts() database function, which I believe is also obsolete and should be removed.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1831803_remove_opac_visible_copies removes asset.opac_visible_copies and search.query_parser_fts (and some related Perl code that was already commented out).

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1831803_remove_opac_visible_copies

Changed in evergreen:
milestone: none → 3.4-beta1
importance: Undecided → Low
tags: added: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

I think this is on the right path. While reviewing it, I ran across a stored procedure, asset.refresh_opac_visible_copies_mat_view(), that updates asset.opac_visible_copies. It looks like there was never a schema update to remove that function, so that removal should be added to this patch series.

I think this also warrants a brief release notes entry in case there are any custom scripts floating out there that are (nowadays incorrectly) using this view.

Changed in evergreen:
status: New → Confirmed
tags: added: needsreleasenote
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.4-beta1 → 3.4-beta2
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.4-beta2 → 3.4.1
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Two additional commits have been pushed to the working branch: one to drop the asset.refresh_opac_visible_copies_mat_view() function if it exists, and another with release notes.

tags: removed: needsreleasenote
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.4.1 → 3.5-alpha
Changed in evergreen:
milestone: 3.5-beta → 3.5.0
Changed in evergreen:
milestone: 3.5.0 → 3.5.1
Changed in evergreen:
milestone: 3.5.1 → 3.5.2
Changed in evergreen:
milestone: 3.5.2 → 3.6.1
tags: added: cleanup
Changed in evergreen:
milestone: 3.6.1 → 3.6.2
Changed in evergreen:
milestone: 3.6.2 → 3.6.3
Changed in evergreen:
milestone: 3.6.3 → 3.6.4
Changed in evergreen:
milestone: 3.6.4 → 3.7.2
Revision history for this message
Jason Boyer (jboyer) wrote :

Hi Jeff, I tried this out and everything worked as expected and there were no complaints from postgres about missing funcs, signoff is here: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jboyer/lp1831803_ovc_cleanup_signoff / working/user/jboyer/lp1831803_ovc_cleanup_signoff

The commit at the tip of that branch also removes the 2 data types that were apparently only ever used for search.query_parser_fts, and their removal also didn't cause any complaints.

Jason Boyer (jboyer)
tags: added: signedoff
Changed in evergreen:
milestone: 3.7.2 → 3.7.3
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.7.3 → 3.9-beta
no longer affects: evergreen/3.6
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master for inclusion in 3.9 along with a couple minor follow-ups. Thanks, Jeff and Jason!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.