File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
server/src/main/java/org/elasticsearch/persistent Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,11 @@ public void clusterChanged(ClusterChangedEvent event) {
272272 periodicRechecker .cancel ();
273273 logger .trace ("checking task reassignment for cluster state {}" , event .state ().getVersion ());
274274 reassignPersistentTasks ();
275+ } else if (periodicRechecker .isScheduled () == false &&
276+ isAnyTaskUnassigned (event .state ().getMetaData ().custom (PersistentTasksCustomMetaData .TYPE ))) {
277+ // If a task is unassigned but would still be unassigned following this cluster state event then schedule a
278+ // recheck just in case it would be assignable after a change in some condition external to the cluster state
279+ periodicRechecker .rescheduleIfNecessary ();
275280 }
276281 }
277282 }
You can’t perform that action at this time.
0 commit comments