-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix PrioritizedThrottledTaskRunnerTests #93446
Fix PrioritizedThrottledTaskRunnerTests #93446
Conversation
These tests try and execute `maxThreads` concurrent tasks to ensure that the rest of the executor's queue has been processed, but due to elastic#93443 (and the executor's zero timeout) this sometimes doesn't work. This commit fixes the problem by making every thread a core thread so that they do not time out. Closes elastic#92910
Pinging @elastic/es-distributed (Team:Distributed) |
@@ -39,7 +39,7 @@ public class PrioritizedThrottledTaskRunnerTests extends ESTestCase { | |||
public void setUp() throws Exception { | |||
super.setUp(); | |||
maxThreads = between(1, 10); | |||
executor = EsExecutors.newScaling("test", 1, maxThreads, 0, TimeUnit.MILLISECONDS, false, threadFactory, threadContext); | |||
executor = EsExecutors.newScaling("test", maxThreads, maxThreads, 0, TimeUnit.NANOSECONDS, false, threadFactory, threadContext); |
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.
Could you please also apply same to:
Lines 199 to 201 in 130378b
final var executor = randomBoolean() | |
? EsExecutors.newScaling("test", 1, maxThreads, 0, TimeUnit.MILLISECONDS, true, threadFactory, threadContext) | |
: EsExecutors.newFixed("test", maxThreads, between(1, 5), threadFactory, threadContext, false); |
to close #92747
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.
👍 good catch
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.
LGTM 2
These tests try and execute `maxThreads` concurrent tasks to ensure that the rest of the executor's queue has been processed, but due to elastic#93443 (and the executor's zero timeout) this sometimes doesn't work. This commit fixes the problem by making every thread a core thread so that they do not time out. Closes elastic#92910 Closes elastic#92747
The same fix as in elastic#93446, which was missed in elastic#93436
These tests try and execute
maxThreads
concurrent tasks to ensure that the rest of the executor's queue has been processed, but due to #93443 (and the executor's zero timeout) this sometimes doesn't work. This commit fixes the problem by making every thread a core thread so that they do not time out.Closes #92910
Closes #92747