Skip to content

Commit 95df751

Browse files
author
David Roberts
committed
Use execute() instead of submit() in MlMemoryTracker
We don't need a Future to wait for completion
1 parent cee07b1 commit 95df751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/process/MlMemoryTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ private void iterateMlJobTasks(Iterator<PersistentTasksCustomMetaData.Persistent
225225
// can occur if the searches happen to be on the local node, as the huge
226226
// chain of listeners are all called in the same thread if only one node
227227
// is involved
228-
mem -> threadPool.executor(executorName()).submit(() -> iterateMlJobTasks(iterator, refreshComplete)),
228+
mem -> threadPool.executor(executorName()).execute(() -> iterateMlJobTasks(iterator, refreshComplete)),
229229
refreshComplete::onFailure));
230230
} else {
231231
refreshComplete.onResponse(null);

0 commit comments

Comments
 (0)