]> git.koha-community.org Git - koha.git/commit
Bug 26996: Convert Elasticsearch indexer commit buffer size to integer
authorBjörn Nylén <bjorn.nylen@ub.lu.se>
Wed, 11 Nov 2020 07:35:21 +0000 (08:35 +0100)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 11 Jan 2021 21:12:57 +0000 (21:12 +0000)
commit65eb9d54d7b7db923872fde192944cd5c1d8d16d
treeb393e73f02383120e3712518f790dfaf3c8a0b07
parentce3d0ff93e2898147c38271c2ab847b6ce4fce31
Bug 26996: Convert Elasticsearch indexer commit buffer size to integer

When multithreaded indexing is used, the commit size for children are spread
out resulting in them being of type float. When records are processed and the
commit counter decreased it may then never reach *exactly* 0. This means records
are never commited. This patch makes sure the counter is an integer to avoid the
problem.

To test you must find a set of circumstances that causes the issue. For me:
1. Run: ./rebuild_elasticsearch -v -b -p 2 -c 400
2. Note that only one process is logging "Committing xxx records..."
3. Kill processes.
4. Apply patch.
5. Repeat 1
6. Note that both processes are logging "Committing xxx records..."

Sponsored-by: Lund University Library
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ba9c9cc794123d60c92a4ce499aa4554299936b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cbe7638619de30abd7d68bb0a8d63e36b2c3d874)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
misc/search_tools/rebuild_elasticsearch.pl