Skip to content

Commit 7248e4d

Browse files
Gankris96jed326
authored andcommitted
pluggable deciders for concurrent search (opensearch-project#15363)
Signed-off-by: Ganesh Ramadurai <[email protected]> Signed-off-by: Jay Deng <[email protected]> Co-authored-by: Jay Deng <[email protected]>
1 parent 0a368e6 commit 7248e4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1422
-117
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4242
- [Reader Writer Separation] Add searchOnly replica routing configuration ([#15410](https://github.com/opensearch-project/OpenSearch/pull/15410))
4343
- [Range Queries] Add new approximateable query framework to short-circuit range queries ([#13788](https://github.com/opensearch-project/OpenSearch/pull/13788))
4444
- [Workload Management] Add query group level failure tracking ([#15227](https://github.com/opensearch-project/OpenSearch/pull/15527))
45+
- Add support for pluggable deciders for concurrent search ([#15363](https://github.com/opensearch-project/OpenSearch/pull/15363))
4546
- Add support to upload snapshot shard blobs with hashed prefix ([#15426](https://github.com/opensearch-project/OpenSearch/pull/15426))
4647
- [Remote Publication] Add remote download stats ([#15291](https://github.com/opensearch-project/OpenSearch/pull/15291)))
4748
- Add support for comma-separated list of index names to be used with Snapshot Status API ([#15409](https://github.com/opensearch-project/OpenSearch/pull/15409))

server/src/internalClusterTest/java/org/opensearch/search/aggregations/AggregationsIntegrationIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
import java.util.Collection;
5858
import java.util.List;
5959

60-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
60+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
61+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
62+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
63+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
6164
import static org.opensearch.search.aggregations.AggregationBuilders.global;
6265
import static org.opensearch.search.aggregations.AggregationBuilders.stats;
6366
import static org.opensearch.search.aggregations.AggregationBuilders.terms;
@@ -81,8 +84,12 @@ public AggregationsIntegrationIT(Settings staticSettings) {
8184
@ParametersFactory
8285
public static Collection<Object[]> parameters() {
8386
return Arrays.asList(
84-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
85-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
87+
new Object[] {
88+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
89+
new Object[] {
90+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
91+
new Object[] {
92+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
8693
);
8794
}
8895

server/src/internalClusterTest/java/org/opensearch/search/aggregations/CombiIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
import java.util.Map;
5252

5353
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
54-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
54+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
55+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
56+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
57+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
5558
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
5659
import static org.opensearch.search.aggregations.AggregationBuilders.missing;
5760
import static org.opensearch.search.aggregations.AggregationBuilders.terms;
@@ -69,8 +72,12 @@ public CombiIT(Settings staticSettings) {
6972
@ParametersFactory
7073
public static Collection<Object[]> parameters() {
7174
return Arrays.asList(
72-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
73-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
75+
new Object[] {
76+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
77+
new Object[] {
78+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
79+
new Object[] {
80+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
7481
);
7582
}
7683

server/src/internalClusterTest/java/org/opensearch/search/aggregations/EquivalenceIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@
7272
import java.util.function.Function;
7373

7474
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
75-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
75+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
76+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
77+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
78+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
7679
import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats;
7780
import static org.opensearch.search.aggregations.AggregationBuilders.filter;
7881
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
@@ -102,8 +105,12 @@ public EquivalenceIT(Settings staticSettings) {
102105
@ParametersFactory
103106
public static Collection<Object[]> parameters() {
104107
return Arrays.asList(
105-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
106-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
108+
new Object[] {
109+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
110+
new Object[] {
111+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
112+
new Object[] {
113+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
107114
);
108115
}
109116

server/src/internalClusterTest/java/org/opensearch/search/aggregations/MetadataIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949
import java.util.Map;
5050

5151
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
52-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
52+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
53+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
54+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
55+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
5356
import static org.opensearch.search.aggregations.AggregationBuilders.sum;
5457
import static org.opensearch.search.aggregations.AggregationBuilders.terms;
5558
import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.maxBucket;
@@ -65,8 +68,12 @@ public MetadataIT(Settings staticSettings) {
6568
@ParametersFactory
6669
public static Collection<Object[]> parameters() {
6770
return Arrays.asList(
68-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
69-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
71+
new Object[] {
72+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
73+
new Object[] {
74+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
75+
new Object[] {
76+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
7077
);
7178
}
7279

server/src/internalClusterTest/java/org/opensearch/search/aggregations/MissingValueIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
import java.util.Arrays;
5252
import java.util.Collection;
5353

54-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
54+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
55+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
56+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
57+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
5558
import static org.opensearch.search.aggregations.AggregationBuilders.cardinality;
5659
import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram;
5760
import static org.opensearch.search.aggregations.AggregationBuilders.geoCentroid;
@@ -73,8 +76,12 @@ public MissingValueIT(Settings staticSettings) {
7376
@ParametersFactory
7477
public static Collection<Object[]> parameters() {
7578
return Arrays.asList(
76-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
77-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
79+
new Object[] {
80+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
81+
new Object[] {
82+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
83+
new Object[] {
84+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
7885
);
7986
}
8087

server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/AvgBucketIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@
5353
import java.util.List;
5454

5555
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
56-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
56+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
57+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
58+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
59+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
5760
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
5861
import static org.opensearch.search.aggregations.AggregationBuilders.sum;
5962
import static org.opensearch.search.aggregations.AggregationBuilders.terms;
@@ -83,8 +86,12 @@ public AvgBucketIT(Settings staticSettings) {
8386
@ParametersFactory
8487
public static Collection<Object[]> parameters() {
8588
return Arrays.asList(
86-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
87-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
89+
new Object[] {
90+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
91+
new Object[] {
92+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
93+
new Object[] {
94+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
8895
);
8996
}
9097

server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketScriptIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363
import java.util.function.Function;
6464

6565
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
66-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
66+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
67+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
68+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
69+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
6770
import static org.opensearch.search.aggregations.AggregationBuilders.dateRange;
6871
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
6972
import static org.opensearch.search.aggregations.AggregationBuilders.sum;
@@ -96,8 +99,12 @@ public BucketScriptIT(Settings staticSettings) {
9699
@ParametersFactory
97100
public static Collection<Object[]> parameters() {
98101
return Arrays.asList(
99-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
100-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
102+
new Object[] {
103+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
104+
new Object[] {
105+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
106+
new Object[] {
107+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
101108
);
102109
}
103110

server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSelectorIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@
6262
import java.util.function.Function;
6363

6464
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
65-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
65+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
66+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
67+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
68+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
6669
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
6770
import static org.opensearch.search.aggregations.AggregationBuilders.sum;
6871
import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketSelector;
@@ -95,8 +98,12 @@ public BucketSelectorIT(Settings staticSettings) {
9598
@ParametersFactory
9699
public static Collection<Object[]> parameters() {
97100
return Arrays.asList(
98-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
99-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
101+
new Object[] {
102+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
103+
new Object[] {
104+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
105+
new Object[] {
106+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
100107
);
101108
}
102109

server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSortIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@
5858
import java.util.List;
5959

6060
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
61-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
61+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
62+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
63+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
64+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
6265
import static org.opensearch.search.aggregations.AggregationBuilders.avg;
6366
import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram;
6467
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
@@ -91,8 +94,12 @@ public BucketSortIT(Settings staticSettings) {
9194
@ParametersFactory
9295
public static Collection<Object[]> parameters() {
9396
return Arrays.asList(
94-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
95-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
97+
new Object[] {
98+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
99+
new Object[] {
100+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
101+
new Object[] {
102+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
96103
);
97104
}
98105

server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DateDerivativeIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363
import java.util.List;
6464

6565
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
66-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
66+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
67+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
68+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
69+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
6770
import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram;
6871
import static org.opensearch.search.aggregations.AggregationBuilders.sum;
6972
import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.derivative;
@@ -89,8 +92,12 @@ public DateDerivativeIT(Settings staticSettings) {
8992
@ParametersFactory
9093
public static Collection<Object[]> parameters() {
9194
return Arrays.asList(
92-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
93-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
95+
new Object[] {
96+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
97+
new Object[] {
98+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
99+
new Object[] {
100+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
94101
);
95102
}
96103

server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DerivativeIT.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@
6161

6262
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
6363
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
64-
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
64+
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE;
65+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_ALL;
66+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_AUTO;
67+
import static org.opensearch.search.SearchService.CONCURRENT_SEGMENT_SEARCH_MODE_NONE;
6568
import static org.opensearch.search.aggregations.AggregationBuilders.avg;
6669
import static org.opensearch.search.aggregations.AggregationBuilders.filters;
6770
import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
@@ -106,8 +109,12 @@ public DerivativeIT(Settings dynamicSettings) {
106109
@ParametersFactory
107110
public static Collection<Object[]> parameters() {
108111
return Arrays.asList(
109-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
110-
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() }
112+
new Object[] {
113+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_ALL).build() },
114+
new Object[] {
115+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_AUTO).build() },
116+
new Object[] {
117+
Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE.getKey(), CONCURRENT_SEGMENT_SEARCH_MODE_NONE).build() }
111118
);
112119
}
113120

0 commit comments

Comments
 (0)