currently our monitoring checks if the indexer is running, and sends an alert if it it isn't. however we've found that sometimes the indexer looks like it is running but the process may not have started fully, and the indexer isn't working. new records and modified records don't show in search results. when we view the zebraqueue in the database, there are rows that have not been committed, i.e. `zebraqueue.done` == 0. checkindex.sh should check if there are rows in the zebraqueue that have not been committed.
Created attachment 131532 [details] [review] Bug 30260: Add is_indexer_working check Function checks if the zebraqueue has rows that are not 'done' Will depend on a change in checkindex.sh which implements the check: https://git.koha-community.org/Koha-community/global/src/branch/master/koha-zebra/checkindex.sh To test: 1. disable the indexer sudo koha-indexer --stop INSTANCENAME 2. catalogue 5 new records 3. confirm they don't show in any search results 4. in your terminal, go to the shell sudo koha-shell INSTANCENAME 5. run the new script. run with -v for verbose or --rows X to specify how many uncommitted records should be checked for. 5 is the default perl misc/maintenance/check_zebraqueue.pl 6. confirm the script returns that the indexer is not working. The function in koha-functions.sh is required for the pending change to checkindex.sh Sponsored-by: Catalyst IT
Unfortunately I can't seem to push to the repo, can someone please help? I can attach the patch here but it won't apply to a koha clone. Am trying to push to this repo: https://git.koha-community.org/Koha-community/global/
Created attachment 131582 [details] [review] Bug 30260: [GLOBAL REPO] Implement is_indexer_working check
Tomas or Martin, can you help with pushing to https://git.koha-community.org/Koha-community/global/?
I had no idea that repo existed.
How should I get that patch into the global repo?
Created attachment 160395 [details] [review] Bug 30260: Add is_indexer_working check Function checks if the zebraqueue has rows that are not 'done' Will depend on a change in checkindex.sh which implements the check: https://git.koha-community.org/Koha-community/global/src/branch/master/koha-zebra/checkindex.sh To test: 1. disable the indexer sudo koha-indexer --stop INSTANCENAME 2. catalogue 5 new records 3. confirm they don't show in any search results 4. in your terminal, go to the shell sudo koha-shell INSTANCENAME 5. run the new script. run with -v for verbose or --rows X to specify how many uncommitted records should be checked for. 5 is the default perl misc/maintenance/check_zebraqueue.pl 6. confirm the script returns that the indexer is not working. The function in koha-functions.sh is required for the pending change to checkindex.sh Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com>
Patch still applies and it worked for me: I had to add 6 new records for the default of 5 to work. Maybe check with Jonathan about the repo - probably something to do with access when we changed to Gitea. Maybe the repository should be added to gitlab.com/koha-community
Comment on attachment 131582 [details] [review] Bug 30260: [GLOBAL REPO] Implement is_indexer_working check This patch has now been pushed to the global repo, so the other patch can be pushed to Koha. https://git.koha-community.org/Koha-community/global/commit/72308768457017c3ff48543c9a52295a064a7253
I don't think we need this fix anymore, with a combination of the following fixes instead: * Bug 36548 (the bug solved here was the believed cause for this fix) * https://git.koha-community.org/Koha-community/global/commit/704060f4ff5497b545b9d807e2ea57c5cc7a85b9 *** This bug has been marked as a duplicate of bug 36548 ***