[Bug 38145] New: Having ES enabled but unreachable breaks cataloguing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 Bug ID: 38145 Summary: Having ES enabled but unreachable breaks cataloguing Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org It seems that changing between Zebra and Elasticsearch produces a bad behavior on the latter, when the search engine is not available. I noticed this while doing some acquisitions where AutoLinkBiblios was set and Koha exploded while trying to link authorities. While writing the steps to reproduce I thought about just adding a record, and boom :-D To reproduce: 1. Start KTD with ES $ ktd --es7 up -d 2. Edit koha-conf.xml so it doesn't find the ES server $ ktd --shell k$ vim /etc/koha/sites/kohadev/koha-conf.xml ... <elasticsearch> <server>potato:9200</server> 3. Catalog a new bibliographic record 4. Click 'Save' => FAIL: Koha explodes: Unable to perform your search. Please try again. at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Search.pm line 104 5. Switch SearchEngine=Zebra 6. Stop Zebra: k$ sudo koha-zebra --stop kohadev 7. Repeat 3-4 (you can go back in the browser) => SUCCESS: It saved the record -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- I will add that the bibliographic search behavior differs between Zebra and ES. * ES: Shows a yellow alert box saying the search couldn't be done * Zebra: Silently shows 'No results for your query' Which is the right one? On attempting to provide a patch, I noticed I was actually changing this behavior to match Zebra's, so asking y'all what we prefer. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think a "more helpful" message would probably be better. It's a difference if there are no results because of my chosen search terms or because the index/search engine is not there at all. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|NEW |CONFIRMED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #2)
I think a "more helpful" message would probably be better. It's a difference if there are no results because of my chosen search terms or because the index/search engine is not there at all.
Yeah, I think Koha should say if it can't connect to the search engine. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 --- Comment #4 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 200206 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200206&action=edit Bug 38145: (draft) Propagate more search errors This is a _draft_ patch. It resolves the two issues mentioned in this bug (unable to catalog without ES being up, Zebra silently producing no search results on error), but I suspect it's incomplete. Test plan: 1. Launch KTD with ElasticSearch: `ktd --search-engine es7 up` 2. Edit `/etc/koha/sites/kohadev/koha-conf.xml` to set an incorrect address for ElasticSearch. 3. Attempt to catalog, verify there is an ElasticSearch error from not being able to search for duplicates. 4. Apply patch. 5. Attempt to catalog, verify it works successfully. 6. Revert patch. 7. Relaunch KTD with Zebra: `ktd down && ktd up`. 8. Stop Zebra in the KTD shell: `sudo koha-zebra --stop kohadev`. 9. Perform a search, verify there are no results and no errors. 10. Apply patch. 11. Perform the search again, verify there are no results and an error about not being able to connect to Zebra. Some points for discussion I'm not sure about: - What would be the best approach to unit testing these changes? - Should searches across multiple Zebra servers fail if any of those servers error? I couldn't immediately find a caller that passed multiple servers, so maybe this case never occurs? - Is there a better way of aggregating the Zebra errors? - Should we surface the Zebra errors directly, or have an equivalent of ElasticSearch's `process_error` that tries to come up with a user-readable error? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Ah yeah I think I bumped into this one again recently... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olivia.reynolds@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org