Bug 6492 - Deleted biblios cause rebuild_zebra to fail
Summary: Deleted biblios cause rebuild_zebra to fail
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: PATCH-Sent (DO NOT USE) critical (vote)
Assignee: Jesse Weaver
QA Contact: Bugs List
URL:
Keywords:
: 6384 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-09 21:48 UTC by Jesse Weaver
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 6492 - Deleted biblios cause rebuild_zebra to fail (4.73 KB, patch)
2011-06-09 23:24 UTC, Jesse Weaver
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6492 - Deleted biblios cause rebuild_zebra to fail (4.48 KB, patch)
2011-06-16 01:16 UTC, MJ Ray (software.coop)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Weaver 2011-06-09 21:48:15 UTC
As described by Ian Walls:

"On current HEAD, zebraqueue entries that point to deleted biblios are returning an error, and preventing every other done=0 entry from being indexed.  I'm not sure if this is occurring after ANY deletion of a biblio, or only through specific vectors like reverting an imported batch, but it's a major problem.

...

The exact error being returned by the rebuild_zebra.pl cronjob is:

Can't call method 'field' on an undefined value at /usr/share/koha/lib/C4/Biblio.pm line 361."
Comment 1 Jesse Weaver 2011-06-09 23:24:29 UTC Comment hidden (obsolete)
Comment 2 Chris Hobbs 2011-06-09 23:49:18 UTC
Looks like this is a duplicate of 6384.
Comment 3 Jesse Weaver 2011-06-10 00:48:52 UTC
Also a duplicate of 5724. Apologies, was in a hurry when filing the bug.

Anyway, 5724 and this bug both have patches that solve the same problem. Which patch should we go with, and what bug should be the master one?
Comment 4 dev_patches 2011-06-10 01:56:07 UTC
Personnaly, I think that we should stick to bug 5724 solution.
Because it appears to me that the rebuild_zebra, with your patch would not export any marc record for deleted_biblios since it won't take them from the deletedbiblioitems table.
So if you would solve the problem of the warning, you would not solve the problem that entries in zebra are not deleted.... And you would need a rebuild_zebra -b -r Which on big database is a bit harmful.
Comment 5 Ian Walls 2011-06-10 17:46:02 UTC
Marking this bug as critical, since it prevents any newly added items or titles from showing up in the catalog, and those are often some of the most important things to patrons.

The fix for 5724 is dependent on 5725, which is a big bit of work.  I'd like to decouple the fixing of this issue from the implementation of batch biblio modification, since this issue is critical, and batch biblio mod is an enhancement (though, yes, a very important one)...

N
Comment 6 Magnus Enger 2011-06-15 08:46:10 UTC
*** Bug 6384 has been marked as a duplicate of this bug. ***
Comment 7 MJ Ray (software.coop) 2011-06-16 01:16:17 UTC
Created attachment 4491 [details] [review]
[SIGNED-OFF] Bug 6492 - Deleted biblios cause rebuild_zebra to fail

This both adds a bit of a failsafe to get_raw_biblio, and prevents
records that have been deleted from being updated by the same instance
of rebuild_zebra.

Minor amendment to remove duplication of 6433

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Comment 8 Chris Cormack 2011-07-04 23:19:32 UTC
Pushed, please test
Comment 9 Bob Ewart 2011-07-05 20:11:32 UTC
I tested it on 3.05.00.004 as downloaded today, 2011-07-05, via git.  

It works!
Comment 10 Chris Cormack 2011-07-05 20:28:04 UTC
Thanks very much for testing Bob :)