Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searchkick parallel update wait not completing

I've set up parallel re-indexing of an index.

Product.reindex(async: {wait: true})

I am running that code in a DelayedJob and waiting since it seems the alternative would be to periodically check on completion status and then promote the new index -- this seems simpler.

Confusingly, reindex never seems to complete. Despite the fact that I've tested it on an index with a single document, I continue to see log messages of "Batches left: 1".

I expect I am misunderstanding the documentation.

like image 730
Ben Avatar asked Mar 26 '18 05:03

Ben


1 Answers

There was a race condition in the code that could cause this. It's fixed in Searchkick 3.0.3+. Here's the relevant commit.

like image 181
Andrew Kane Avatar answered Oct 20 '22 13:10

Andrew Kane