[Bug 5657] New: biblio records update fails when updating multiple authorities linked with the same biblio
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Summary: biblio records update fails when updating multiple authorities linked with the same biblio Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: MARC Authority data support AssignedTo: gmcharlt@gmail.com ReportedBy: januszop@gmail.com QAContact: koha-bugs@lists.koha-community.org CC: ian.walls@bywatersolutions.com Estimated Hours: 0.0 Created attachment 3022 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3022 Proposed patch There is a following issue in authority support, when updating multiple authorities and then updating biblio records in batch (in Zebra mode). If both happens: 1) two authorities linked with the same bibliographic record are updated; 2) and then between two subsequent calls of the merge function (i.e. by merge_authority.pl script) the zebra database will not be updated, then after the second call of the merge function the field controlled by the first authority will return to its original state. This is because in the merge functions (in Zebra mode) the bibliographic records to be updated are collected from zebra database and not from sql database, which contains the fresh updated version of records. Imagine the following scenario: there are two authors of a work described by record R, say A and B. A and B have their authority records. We are updating both authority records and the authors become now A1 and B1 (in authorities). We have Zebra indexes and dontmerge syspref set to 1. Now we run merge_authority.pl script in batch mode. After the first run of the while loop author A in R becomes A1 (and R becomes R1) and the updated record is stored (by ModBiblio called from merge) only in sql database. So far so good. But then, in the second run, merge functions selects records for update from zebra database so, if zebra queue processing was not fast enough or was switched off at the moment, what will be updated now is R from zebra database (and not R1 from sql database). And therefore after the second run we get R2, where the second author is B1, but first is still A. Attached is a simple workaround. Comments are welcome. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 januszop@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Status|NEW |ASSIGNED Patch Status|--- |Needs Signoff AssignedTo|gmcharlt@gmail.com |januszop@gmail.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 --- Comment #1 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2011-02-05 19:01:21 UTC --- This bug is mentioned in: Bug 5657 Changes made to sub merge to eliminate errors occuring when updating bibio records in batch (after updating multiple authority records) http://lists.koha-community.org/pipermail/koha-patches/2011-January/013701.h... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaune@biblibre.c | |om --- Comment #2 from stephane.delaune@biblibre.com 2011-04-06 13:13:27 UTC --- This patch conflicts with patch bug 5943. It just changes the sub merge C4::AuthoritiesMarc::merge which is only used by function C4::AuthoritiesMarc::ModAuthority if (C4::Context->preference('MergeAuthoritiesOnUpdate') ). This syspref does not exist by default. So it makes me doubt the relevance of this patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 --- Comment #3 from januszop@gmail.com 2011-04-06 13:28:13 UTC --- I am wondering--and how then about the merge_authority.pl script (it makes use of C4::AuthoritiesMarc::merge), which in turn should be executed (as cron job for example, if I understand well) if MergeAuthoritiesOnUpdate is off (which is the default)...? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Does not apply --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-30 14:38:50 UTC --- Applying: Changes made to sub merge to eliminate errors occuring when updating bibio records in batch (after updating multiple authority records) error: patch failed: C4/AuthoritiesMarc.pm:1299 error: C4/AuthoritiesMarc.pm: patch does not apply fatal: sha1 information is lacking or useless (C4/AuthoritiesMarc.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3022|0 |1 is obsolete| | --- Comment #5 from Janusz Kaczmarek <januszop@gmail.com> 2012-02-01 18:06:29 UTC --- Created attachment 7415 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7415 A refreshed version of the patch A refreshed version of the patch (should apply smoothly to 3.7.x master). -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7415|0 |1 is obsolete| | --- Comment #6 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 8145 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8145&action=edit Bug 5657: Changes made to sub merge to eliminate errors occuring when updating bibio records in batch (after updating multiple authority records) Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |jcamins@cpbibliography.com -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Ian Walls <koha.sekjal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Ian Walls <koha.sekjal@gmail.com> --- Looks like this patch changes a direct passage of the Zebra MARC record result to a re-fetch, based on the biblionumber. This should help eliminate conditions where the details of a record change mid-stream, at the cost of some processing time. Change looks good, marking as Passed QA. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|unspecified |rel_3_6 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- This patch result in a loss of performance, but it's much better than losing things ;-) (I haven't numbers, but instead of just retrieving from zebra, there are additional SQL queries to retrieve the data, so it can only be slower) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This bug will be included in the Koha 3.6.5 release. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org