Bug 26312: Catch ES Client errors, log, and continue indexing when error encountered
authorNick Clemens <nick@bywatersolutions.com>
Thu, 27 Aug 2020 16:04:57 +0000 (16:04 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 19 Apr 2021 13:14:46 +0000 (15:14 +0200)
commitd78690a0ab4d38ef3ad430b6ed9bd02b393834b2
tree48ebc9c373d2e2394daedc0bddbd044bacdc1e94
parent2c8e612f1e58411e20b966ae7714b1bf619571b8
Bug 26312: Catch ES Client errors, log, and continue indexing when error encountered

This catches a timeout response from the ES server, logs this, and continues the indexing

To test:
1 - perl misc/search_tools/rebuild_elasticsearch.pl
2 - Make the ES server timeout (I don't have good instruction yet)
3 - Watch the job crash
4 - Apply patches
5 - perl misc/search_tools/rebuild_elasticsearch.pl
6 - Make the server timeout
7 - Note the job reports failed commit, and continues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Bug 26312: (follow-up) Reset buffers even if commit fails

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Bug 26312: (follow-up) Fix whitespace and missing semicolon

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 72e6999db7cbfc077f200930dd28400d1f86831e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Exceptions/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/Indexer.pm
misc/search_tools/rebuild_elasticsearch.pl