Skip to content

Commit

Permalink
fix(indexer): Fix concurrency issues in ReindexThread (#30083) (#30084)
Browse files Browse the repository at this point in the history
Fixes concurrency issues and prevents race conditions that cause the
indexer from hanging or shutting down immediately after startup.

This PR resolves #30083 (Startup timeouts due to indexer concurrency
issues).
  • Loading branch information
spbolton authored Sep 23, 2024
1 parent 042b378 commit 462828c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ private static void unpauseImpl() {
OSGISystem.getInstance().initializeFramework();
Logger.infoEvery(ReindexThread.class, "--- ReindexThread Running", 60000);
cache.get().remove(REINDEX_THREAD_PAUSED);
final Thread thread = new Thread(getInstance().ReindexThreadRunnable,
"ReindexThreadRunnable");

final DotSubmitter submitter = DotConcurrentFactory.getInstance()
.getSubmitter("ReindexThreadSubmitter",
Expand All @@ -340,8 +338,8 @@ private static void unpauseImpl() {
new ThreadPoolExecutor.DiscardOldestPolicy())
.build()
);
submitter.submit(thread);
getInstance().state(ThreadState.RUNNING);
submitter.submit(getInstance().ReindexThreadRunnable);
}

}
Expand Down

0 comments on commit 462828c

Please sign in to comment.