Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,22 @@ public synchronized boolean maybeTriggerAsyncJob(long now) {
return false;
}

/*
* ignore if indexer thread is shutting down (after finishing a checkpoint)
* shutting down means:
* - indexer has finished a checkpoint and called onFinish
* - indexer state has changed from indexing to started
* - state persistence has been called but has _not_ returned yet
*
* If we trigger the indexer in this situation the 2nd indexer thread might
* try to save state at the same time, causing a version conflict
* see gh#67121
*/
if (indexerThreadShuttingDown) {
logger.debug("[{}] indexer thread is shutting down. Ignoring trigger.", getJobId());
return false;
}

return super.maybeTriggerAsyncJob(now);
}

Expand Down