metabib.remap_metarecord_for_bib has bad logic

Bug #953439 reported by Thomas Berezansky
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned

Bug Description

The first thing done by metabib.remap_metarecord_for_bib is to delete all metarecord_source_map entries where the source is our bib_id.

The second thing done is to loop over metarecord entries by joining to metarecord_source_map with a condition that the source is our bib_id. Which, as we just deleted all of those, will never find anything.

Both of these lines were introduced at the same time in 2010, so I am unsure what the logic is supposed to be. I highly suspect that something that is supposed to be happening is not, though, and that the bad logic is creating problems elsewhere, for example parallel hold targeting that joins to the source map table and can find no entries there. In that case holds are skipped over.

Tags: metarecords
Revision history for this message
Mike Rylander (mrylander) wrote :

Quick note.

I don't have time to tackle this ATM, but it looks like the initial DELETE needs to be moved down into the IF branch of the conditional inside the first LOOP.

Revision history for this message
Mike Rylander (mrylander) wrote :

Also, if you are seeing hold targeting failure when using the parallel hold targetter, running Open-ILS/src/extras/import/quick_metarecord_map.sql will fill in the holes in the metarecord source map and allow holds to target properly. Until this issue is addressed, however, holes the the metarecord mapping can build up again as bib records change in the system.

Changed in evergreen:
status: New → Incomplete
Changed in evergreen:
status: Incomplete → Triaged
Kathy Lussier (klussier)
tags: added: metarecords
Revision history for this message
Jeff Godin (jgodin) wrote :

This particular logic was fixed as part of work in commit 5f030686 related to bug 1284864. Setting this bug to Fix Released.

Changed in evergreen:
status: Triaged → 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.