Bug 24306

Summary: Add debug option to koha-indexer
Product: Koha Reporter: Nick Clemens <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas, mtj, robin, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
These patches add a --debug switch to the koha-indexer script. This will vastly increase the logging output of the rebuild zebra daemon. This information may be useful for determining why some records are not being indexed.
Version(s) released in:
20.11.00
Attachments: Bug 24306: Add debug switch to koha-indexer
Bug 24306: Add debug switch to koha-indexer
Bug 24306: (follow-up) Add documentation for debug option
Bug 24306: Add debug switch to koha-indexer
Bug 24306: (follow-up) Add documentation for debug option
Bug 24306: (QA follow-up) Fix the XML

Description Nick Clemens 2019-12-24 13:58:56 UTC
Would be nice to be able to raise logging level and see errors from the indexer
Comment 1 Nick Clemens 2019-12-24 14:02:44 UTC
Created attachment 96621 [details] [review]
Bug 24306: Add debug switch to koha-indexer

This raises the debug level a lot, it it a bit overwhelming, but may be useful in debugging indexing issues

To test:
1 - Apply patches
2 - sudo koha-indexer --stop instance
3 - sudo debian/scripts/koha-indexer --start --debug instance
4 - tail -f /var/log/koha/instance/indexer-output.log
5 - Note you get a listing that nothign in the queue
6 - Go to staff client and make a change to a record
7 - Note the logs have tons of info
Comment 2 David Nind 2020-02-22 17:26:57 UTC
Created attachment 99460 [details] [review]
Bug 24306: Add debug switch to koha-indexer

This raises the debug level a lot, it it a bit overwhelming, but may be useful in debugging indexing issues

To test:
1 - Apply patches
2 - sudo koha-indexer --stop instance
3 - sudo debian/scripts/koha-indexer --start --debug instance
4 - tail -f /var/log/koha/instance/indexer-output.log
5 - Note you get a listing that nothign in the queue
6 - Go to staff client and make a change to a record
7 - Note the logs have tons of info

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2020-02-24 10:44:28 UTC
Why --debug and not --verbose?
Note that koha-elasticsearch has a verbose flag (and other script in debian/scripts)

You should also update debian/docs/koha-indexer.xml, and maybe tell that the new flag is not for production use, bug debug purpose only (obvious if you keep --debug, but worth a note if we go with --verbose).
Comment 4 Nick Clemens 2020-02-24 13:47:31 UTC
(In reply to Jonathan Druart from comment #3)
> Why --debug and not --verbose?
> Note that koha-elasticsearch has a verbose flag (and other script in
> debian/scripts)
> 
> You should also update debian/docs/koha-indexer.xml, and maybe tell that the
> new flag is not for production use, bug debug purpose only (obvious if you
> keep --debug, but worth a note if we go with --verbose).

I think I went with debug because it is incredibly verbose.

The script is hardcoded with verbose=1 in the options elsewhere, so you never really have a non-verbose option
Comment 5 Nick Clemens 2020-07-28 12:01:31 UTC
Created attachment 107460 [details] [review]
Bug 24306: (follow-up) Add documentation for debug option
Comment 6 Tomás Cohen Arazi 2020-08-11 14:53:55 UTC
Created attachment 108073 [details] [review]
Bug 24306: Add debug switch to koha-indexer

This raises the debug level a lot, it it a bit overwhelming, but may be useful in debugging indexing issues

To test:
1 - Apply patches
2 - sudo koha-indexer --stop instance
3 - sudo debian/scripts/koha-indexer --start --debug instance
4 - tail -f /var/log/koha/instance/indexer-output.log
5 - Note you get a listing that nothign in the queue
6 - Go to staff client and make a change to a record
7 - Note the logs have tons of info

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi 2020-08-11 14:53:59 UTC
Created attachment 108074 [details] [review]
Bug 24306: (follow-up) Add documentation for debug option

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi 2020-08-11 14:54:03 UTC
Created attachment 108075 [details] [review]
Bug 24306: (QA follow-up) Fix the XML

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Jonathan Druart 2020-08-13 05:57:16 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Lucas Gass 2020-08-17 15:27:08 UTC
enhancement will not be backported to 20.05.x