https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44022

--- Comment #1 from Johan Larsson <[email protected]> ---
Created attachment 210825
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210825&action=edit
Bug 44022: Do not disable the Elasticsearch product check for the rest of the
process

Bug 38345 made Koha work with OpenSearch by wrapping
Search::Elasticsearch::Role::Cxn::process_response and setting
$Search::Elasticsearch::Role::Cxn::PRODUCT_CHECK_VALUE = '' whenever a
response has no x-elastic-product header, to skip the product check.

The assignment is permanent. A client side failure (timeout, refused or
reset connection) is reported by HTTP::Tiny as a synthetic 599 response
without headers, so after the first such failure the setting is changed
for the whole process. In a long running process (es_indexer_daemon.pl,
Plack workers) the next response from a healthy Elasticsearch node is
then rejected, the node is marked dead, and every following request
fails with 'No nodes are available' until the process is restarted,
even though Elasticsearch is reachable again. With several nodes
configured failover fails the same way.

Use local, so the product check is skipped for that one response only.

Test plan:
1. Start a long running process that talks to Elasticsearch, e.g.
   misc/workers/es_indexer_daemon.pl, or use a script that creates a
   Koha::SearchEngine::Indexer in a loop and calls update_index().
2. Stop Elasticsearch for about ten seconds, then start it again.
=> Without the patch the process keeps failing with 'No nodes are
   available' (type NoNodes) after Elasticsearch is back; a new
   process can reach Elasticsearch.
=> With the patch the process recovers as soon as Elasticsearch
   answers.
3. prove t/Koha/SearchEngine/Elasticsearch/ProductCheck.t

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to