Metarecords are not being maintained properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.10 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
A quick test on 2.7.0:
1. Find a group of records for a metarecord:
select * from metabib.metarecord a where master_record in(select source from metabib.
and id in
(select metarecord from (select metarecord,count(*) from metabib.
2. Update the MARC for the master record in such a way that the resulting fingerprint is totally different than the rest of the group.
3. At this point, you can run this query:
select metarecord,source
from metabib.
and you will find that your record is still apart of the group even with the fingerprint difference.
This query will show the group's fingerprints:
select id,fingerprint from biblio.record_entry where id in(
select source
from metabib.
)
4. Update config.
5. Update/reingest the group of bibs:
update biblio.record_entry set id=id where id in(
select source
from metabib.
)
6. The only thing that changes now that you have reingested the group, is the master_record will point to another member of the group
I believe that this is a bug in metabib.
and might be related to
https:/
Relevant IRC discussion:
http://
Our database contains metarecords that have a master record pointing to a record that is not a member of the group. This query identifies that situation:
select * from metabib.metarecord a where master_record not in(select source from metabib.
and id in
(select metarecord from (select metarecord,count(*) from metabib.
These are probably related issues. Deleted records also seem to remain in the metarecord group. Which might be OK, not sure.
tags: | added: fingerprint metarecords |
Changed in evergreen: | |
status: | Confirmed → Fix Committed |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I've tracked this down, at least in part, to a bug in the logic in metabib. remap_metarecor d_for_bib( ) for deleting the old metarecord mapping (and possibly the metarecord) when the bib's fingerprint has changed.