-
Notifications
You must be signed in to change notification settings - Fork 1.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
Changes ConcurrentSearchTasksIT to use custom slice count #17355
base: main
Are you sure you want to change the base?
Conversation
❌ Gradle check result for 8ea75ef: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rampreeth Ethiraj <[email protected]>
8ea75ef
to
9abade8
Compare
❌ Gradle check result for 9abade8: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rampreeth Ethiraj <[email protected]>
❌ Gradle check result for c4d000a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rampreeth Ethiraj <[email protected]>
❌ Gradle check result for fa04c65: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
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.
Thanks for working on this @rampreeth!
@@ -248,6 +248,7 @@ static Setting<Integer> buildNumberOfShardsSetting() { | |||
static final String MAX_NUMBER_OF_SHARDS = "opensearch.index.max_number_of_shards"; | |||
public static final Setting<Integer> INDEX_NUMBER_OF_SHARDS_SETTING = buildNumberOfShardsSetting(); | |||
public static final String SETTING_NUMBER_OF_REPLICAS = "index.number_of_replicas"; | |||
public static final String MAX_SLICE_COUNT = "index.search.concurrent.max_slice_count"; |
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.
Can we either also use this same string in the setting name:
OpenSearch/server/src/main/java/org/opensearch/index/IndexSettings.java
Lines 727 to 733 in 442a928
public static final Setting<Integer> INDEX_CONCURRENT_SEGMENT_SEARCH_MAX_SLICE_COUNT = Setting.intSetting( | |
"index.search.concurrent.max_slice_count", | |
CONCURRENT_SEGMENT_SEARCH_TARGET_MAX_SLICE_COUNT_DEFAULT_VALUE, | |
CONCURRENT_SEGMENT_SEARCH_TARGET_MAX_SLICE_COUNT_DEFAULT_VALUE, | |
Property.Dynamic, | |
Property.IndexScope | |
); |
or, we can just do:
INDEX_CONCURRENT_SEGMENT_SEARCH_MAX_SLICE_COUNT.getKey()
That way if we ever need to change the setting there's only 1 place to modify instead of 2.
@@ -89,6 +90,7 @@ public void testConcurrentSearchTaskTracking() { | |||
Settings.builder() | |||
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, NUM_SHARDS) | |||
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0) | |||
.put(IndexMetadata.MAX_SLICE_COUNT, 5) |
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.
One main goal of using the setting name is so we can use a random number here instead of hard coding to 5
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.
@jed326 , from what I understood, we need to assert the segment count by validating against the slice count that i sset. So, this particular line is where we're setting the slice count. Even if we were to use a random number, that particular value would still be hardcoded right? Please correct me if I'm missing something here
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.
More specifically we're asserting that the stats are being tracked for all the slices. So the idea is if slice count is set to 2 then we check that the stats are tracked for 2 slices + search thread, etc. So setting the slice count to a random number between (1, num_segments) ensures we have full coverage and not some magical dependency on specifically 5 for example.
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.
Got it, thanks for the clarification, will make the necessary changes
Description
Changes ConcurrentSearchTasksIT to use custom slice count
Related Issues
Resolves #9317
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.