-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ML] Refactor inference request executor to leverage scheduled execution #126858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Refactor inference request executor to leverage scheduled execution #126858
Conversation
Hi @jonathan-buttner, I've created a changelog YAML for you. |
…r/elasticsearch into ml-refactor-request-exec
assertTrue(service.isTerminated()); | ||
} | ||
|
||
public void testSleep_ThrowingInterruptedException_TerminatesService() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're no longer using a "sleeper" so we don't need this test anymore.
while (isShutdown() == false) { | ||
handleTasks(); | ||
} | ||
} catch (InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're not sleeping and we're not using a long lived thread we don't need to catch the interrupted exception.
Pinging @elastic/ml-core (Team:ML) |
…ion (elastic#126858) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log
💔 Backport failed
You can use sqren/backport to manually backport by running |
…ion (elastic#126858) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log (cherry picked from commit 7a0f63c) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
…ion (elastic#126858) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log (cherry picked from commit 7a0f63c) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
…ion (elastic#126858) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log (cherry picked from commit 7a0f63c) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…ion (#126858) (#126948) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log (cherry picked from commit 7a0f63c) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
…ion (#126858) (#126950) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log (cherry picked from commit 7a0f63c) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
…ion (#126858) (#126949) * Using threadpool schedule and fixing tests * Update docs/changelog/126858.yaml * Clean up * change log (cherry picked from commit 7a0f63c) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
Fixes #126853
This PR refactors the
RequestExecutorService
to useThreadPool.schedule
instead of having a long lived thread that sleeps.Testing
The
inference_utility
thread should no longer report an always active thread:Retrieving hot threads shouldn't show the utility thread all the time now