Skip to content
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

[BUG] Flaky org.opensearch.threadpool.ScalingThreadPoolTests.testScalingThreadPoolConfiguration test #7530

Closed
reta opened this issue May 11, 2023 · 7 comments · Fixed by #7539
Assignees
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run untriaged

Comments

@reta
Copy link
Collaborator

reta commented May 11, 2023

Describe the bug
The org.opensearch.threadpool.ScalingThreadPoolTests.testScalingThreadPoolConfiguration test became flaky after #7400

To Reproduce

./gradlew ':server:test' --tests "org.opensearch.threadpool.ScalingThreadPoolTests.testScalingThreadPoolConfiguration" -Dtests.seed=6EC695D9A055C669 

If the commit (#7400) is reverted, test passes normally (seems to be caused by REMOTE_REFRESH thread pool)

Expected behavior
Test should always pass

Plugins
Standard

Screenshots

Host/Environment (please complete the following information):

  • CI

Additional context
N/A

@reta reta added bug Something isn't working untriaged flaky-test Random test failure that succeeds on second run and removed untriaged labels May 11, 2023
@reta
Copy link
Collaborator Author

reta commented May 11, 2023

@ashking94 could you please take a look?

@ashking94
Copy link
Member

@ashking94 could you please take a look?

Ack

@ashking94
Copy link
Member

thanks for creating this @reta. Here is the fix pr - #7539. Do take a look.

@dblock
Copy link
Member

dblock commented Oct 6, 2023

This is back in #10430.

@ashking94
Copy link
Member

This is back in #10430.

Happened due to some other reason this time, should we create another issue?

@dblock
Copy link
Member

dblock commented Oct 10, 2023

@ashking94 Feel free to open another one and (I can) close this one.

@ashking94
Copy link
Member

I was able to reproduce this on the commit id where this failed and it was happening due to Names.REMOTE_RECOVERY not being handled in the expectedSize method. This has been handled subsequently recently with #10750.

private int expectedSize(final String threadPoolName, final int numberOfProcessors) {
final Map<String, Function<Integer, Integer>> sizes = new HashMap<>();
sizes.put(ThreadPool.Names.GENERIC, n -> ThreadPool.boundedBy(4 * n, 128, 512));
sizes.put(ThreadPool.Names.MANAGEMENT, n -> 5);
sizes.put(ThreadPool.Names.FLUSH, ThreadPool::halfAllocatedProcessorsMaxFive);
sizes.put(ThreadPool.Names.REFRESH, ThreadPool::halfAllocatedProcessorsMaxTen);
sizes.put(ThreadPool.Names.WARMER, ThreadPool::halfAllocatedProcessorsMaxFive);
sizes.put(ThreadPool.Names.SNAPSHOT, ThreadPool::halfAllocatedProcessorsMaxFive);
sizes.put(ThreadPool.Names.FETCH_SHARD_STARTED, ThreadPool::twiceAllocatedProcessors);
sizes.put(ThreadPool.Names.FETCH_SHARD_STORE, ThreadPool::twiceAllocatedProcessors);
sizes.put(ThreadPool.Names.TRANSLOG_TRANSFER, ThreadPool::halfAllocatedProcessorsMaxTen);
sizes.put(ThreadPool.Names.TRANSLOG_SYNC, n -> 4 * n);
sizes.put(ThreadPool.Names.REMOTE_PURGE, ThreadPool::halfAllocatedProcessorsMaxFive);
sizes.put(ThreadPool.Names.REMOTE_REFRESH_RETRY, ThreadPool::halfAllocatedProcessorsMaxTen);
sizes.put(ThreadPool.Names.REMOTE_RECOVERY, ThreadPool::twiceAllocatedProcessors);
return sizes.get(threadPoolName).apply(numberOfProcessors);

Also, this has not shown up from multiple days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants