https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43569
--- Comment #2 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 206319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206319&action=edit Bug 43569: Phase 2 - harden rebuild_elasticsearch.pl against silent failures Building on the update_index() Koha::Result::Boolean contract from Phase 1, the reindex script no longer reports success when records fail to index. - _handle_response() now consumes the Koha::Result::Boolean, counts the per-document failures, and surfaces a summary regardless of verbosity so cronjobs notice (previously the error line was suppressed at the default verbosity used by cron). - Both the buffered commits and the final flush go through _commit_chunk(), so a whole-operation failure (e.g. Elasticsearch becoming unreachable) on the last chunk is handled like any other chunk instead of dying mid-run under 'use autodie'. - The script now exits non-zero when any record failed to index, giving cron wrappers a way to detect trouble. - In --processes mode, child exit status is aggregated by the parent (wait() return status is now checked), so a failed slice can no longer be hidden behind a clean parent slice. - The final line reports processed vs indexed vs failed counts instead of overstating success. Test plan: 1. koha-shell kohadev -c 'perl misc/search_tools/rebuild_elasticsearch.pl -b' Reindex succeeds and exits 0 (echo $?). 2. Make Elasticsearch unreachable and rerun: the script reports the failure visibly and exits non-zero. -- You are receiving this mail because: 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/
