Fix online reindexer not starting
Since Ie88b7effd, the online reindexer was no longer starting automatically. Before that change, the OnlineReindexer was only created if index version was not the latest. The intention of that change was to always create the OnlineReindexer for the latest index version to allow forcing a reindex using the ssh command. The problem is that the way it was implemented, the OnlineReindexer was created but never started. Fix this by always creating the OnlineReindexer and starting it if index version is not latest. Change-Id: I34c99c041d4665a3dbe76aaeb70e5e759f827ceb
This commit is contained in:
@@ -164,10 +164,10 @@ public class LuceneVersionManager implements LifecycleListener {
|
||||
|
||||
int latest = write.get(0).version;
|
||||
OnlineReindexer<K, V, I> reindexer = new OnlineReindexer<>(def, latest);
|
||||
reindexers.put(def.getName(), reindexer);
|
||||
if (onlineUpgrade && latest != search.version) {
|
||||
synchronized (this) {
|
||||
if (!reindexers.containsKey(def.getName())) {
|
||||
synchronized (this) {
|
||||
if (!reindexers.containsKey(def.getName())) {
|
||||
reindexers.put(def.getName(), reindexer);
|
||||
if (onlineUpgrade && latest != search.version) {
|
||||
reindexer.start();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user