When a record fails to decode during a search, Koha dies with an error. Koha should ignore bad records and continue on ( and log the error ).
Created attachment 20109 [details] [review] Bug 10684 - Koha search dies on undecodable records When a record fails to decode during a search, Koha dies with an error. Koha should ignore bad records and continue on ( and log the error ).
Please add a test plan. How can one load/modify a record so as to reproduce the error and confirm the fix?
That is something I've yet to figure out. This is a fix I wrote for a production server where the database marc and marcxml are valid, but the marc sent by zebra is bad. I have no idea how to intentionally cause this issue. However, one can prove the patch is not deleterious simply by applying the patch and searching for records within Koha.
Created attachment 20200 [details] [review] Bug 10684 - Koha search dies on undecodable records When a record fails to decode during a search, Koha dies with an error. Koha should ignore bad records and continue on ( and log the error ). Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
QA comment: No way to reproduce but catching possible error on this method is not a bad idea. Marked as Passed QA.
Created attachment 20632 [details] [review] Bug 10684 - Koha search dies on undecodable records When a record fails to decode during a search, Koha dies with an error. Koha should ignore bad records and continue on ( and log the error ). Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20633 [details] [review] Bug 10684 - Followup Koha search dies on undecodable records Prevent future error. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20635 [details] [review] Bug 10684 - Followup Koha search dies on undecodable records Prevent future error. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master and 3.14.x, along with a regression test. Thanks, Kyle!
This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Kyle!