[ML] Ensuring only a single request executor object is created#133424
Conversation
|
Pinging @elastic/ml-core (Team:ML) |
|
Hi @jonathan-buttner, I've created a changelog YAML for you. |
| } | ||
|
|
||
| public Sender createSender() { | ||
| return httpRequestSender; |
There was a problem hiding this comment.
We don't really need this method or the class anymore. We can do additional refactoring but I wanted to keep the fix in a small PR. This method is used a lot throughout the tests.
There was a problem hiding this comment.
Yeah maybe we should (eventually) replace this whole class with a Lazy or a SetOnce so we don't have to have a countdown latch in a constructor, but I see that we do that in SenderService regardless so there's no change there I suppose
| } | ||
|
|
||
| public Sender createSender() { | ||
| return httpRequestSender; |
There was a problem hiding this comment.
Yeah maybe we should (eventually) replace this whole class with a Lazy or a SetOnce so we don't have to have a countdown latch in a constructor, but I see that we do that in SenderService regardless so there's no change there I suppose
…ic#133424) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml
💔 Backport failed
You can use sqren/backport to manually backport by running |
…) (#133670) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml
…) (#133669) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml
…ic#133424) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml (cherry picked from commit d5a9343) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/amazonbedrock/AmazonBedrockRequestSenderTests.java
…ic#133424) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml (cherry picked from commit d5a9343) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/amazonbedrock/AmazonBedrockRequestSenderTests.java
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…ic#133424) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml (cherry picked from commit d5a9343) # Conflicts: # x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSender.java # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/amazonbedrock/AmazonBedrockRequestSenderTests.java
…) (#133715) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml (cherry picked from commit d5a9343) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/amazonbedrock/AmazonBedrockRequestSenderTests.java
…) (#133716) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml (cherry picked from commit d5a9343) # Conflicts: # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/amazonbedrock/AmazonBedrockRequestSenderTests.java
…) (#133721) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml (cherry picked from commit d5a9343) # Conflicts: # x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSender.java # x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/amazonbedrock/AmazonBedrockRequestSenderTests.java
…ic#133424) (elastic#133670) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml
…ic#133424) (elastic#133670) * Ensuring only a single request executor thread is started * Reverting test changes * Update docs/changelog/133424.yaml
This PR makes sure only a single
HttpRequestSenderandRequestExecutorobject is created. There's been a bug where the first request to each integration would start a newRequestExecutorServicewhich would cause new threads to be scheduled.