Bug 22892 - Warning when reindexing without parameters
Summary: Warning when reindexing without parameters
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on: 21872
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-11 12:02 UTC by Katrin Fischer
Modified: 2019-05-30 19:10 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00


Attachments
Bug 22892: Remove warning from rebuild_es if --processes not passed (1.24 KB, patch)
2019-05-13 00:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22892: Remove warning from rebuild_es if --processes not passed (1.30 KB, patch)
2019-05-13 21:47 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2019-05-11 12:02:56 UTC
There is a warning, when rebuilding the elastic search index without giving any parameters:

Use of uninitialized value $processes in numeric lt (<) at ./misc/search_tools/rebuild_elasticsearch.pl line 199.
Comment 1 Jonathan Druart 2019-05-13 00:49:35 UTC
Created attachment 89646 [details] [review]
Bug 22892: Remove warning from rebuild_es if --processes not passed

Use of uninitialized value $processes in numeric lt (<) at
misc/search_tools/rebuild_elasticsearch.pl line 199.

We want the number of processes to be set to 1 by default, and then
assign it to $slice_count

Test plan:
Run the script with and without --processes and confirm that the warning
went away.
Comment 2 Katrin Fischer 2019-05-13 21:47:18 UTC
Created attachment 89721 [details] [review]
Bug 22892: Remove warning from rebuild_es if --processes not passed

Use of uninitialized value $processes in numeric lt (<) at
misc/search_tools/rebuild_elasticsearch.pl line 199.

We want the number of processes to be set to 1 by default, and then
assign it to $slice_count

Test plan:
Run the script with and without --processes and confirm that the warning
went away.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Katrin Fischer 2019-05-13 21:47:39 UTC
Trivial fix - going straight to PQA.
Comment 4 Nick Clemens 2019-05-15 12:18:47 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-05-30 19:10:41 UTC
Bug with enhancement not in 18.11.x series.