-
Notifications
You must be signed in to change notification settings - Fork 2k
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?
Changes from all commits
9abade8
c4d000a
fa04c65
a519924
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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 commentThe 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
or, we can just do:
That way if we ever need to change the setting there's only 1 place to modify instead of 2. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this comment needs to be addressed still too |
||||||||||||||||
public static final Setting<Integer> INDEX_NUMBER_OF_REPLICAS_SETTING = Setting.intSetting( | ||||||||||||||||
SETTING_NUMBER_OF_REPLICAS, | ||||||||||||||||
1, | ||||||||||||||||
|
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.
I think this should be the
min
of the slice count setting and the number of segments. Otherwise this test might be a little flaky depending on the refresh interval of the index and the maxSliceCount (for example, if maxSliceCount == 7 but somehow only 5 segments were created, then this should be only 5 still).