Comment 2 for bug 1798910

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

EG 3.3.4, just upgraded from 2.10 about 2 weeks ago. Just ran into this issue with ebook titles added since the upgrade.

I'm not sure why we had 'ingest.reingest.force_on_same_marc' enabled, probably just for convenience when re-indexing.

We noticed it because ebook bibs that had been added after the upgrade were showing up to staff in other systems. The vis_attr_vector didn't include the LURI info, set to '{268435557}' instead of '{268435557,101}' for example.

Used a variation of the example upgrade sql to update the vis_attr_vector for bibs added or edited since our upgrade.

update biblio.record_entry
set vis_attr_vector = biblio.calculate_bib_visibility_attribute_set(id)
where create_date > '2019-10-19'::timestamp
or edit_date > '2019-10-19'::timestamp
;

If the problem is that each update of vis_attr_vector triggers another reingest, then would it work to add in some checks to only update bre.vis_attr_vector if the value is different than what is already there? So the update only happens the first time?

             UPDATE biblio.record_entry
               SET vis_attr_vector = biblio.calculate_bib_visibility_attribute_set(NEW.record)
               WHERE id = NEW.record
               AND vis_attr_vector is distinct from biblio.calculate_bib_visibility_attribute_set(NEW.record);