Skip to content

Commit e16e113

Browse files
committed
Remove suggest threadpool
In elastic#17198, we removed suggest transport action, which used the `suggest` threadpool to execute requests. Now `suggest` threadpool is unused and suggest requests are executed on the `search` threadpool.
1 parent 04e6e6c commit e16e113

File tree

6 files changed

+5
-23
lines changed

6 files changed

+5
-23
lines changed

core/src/main/java/org/elasticsearch/rest/action/cat/RestThreadPoolAction.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public class RestThreadPoolAction extends AbstractCatAction {
6666
ThreadPool.Names.REFRESH,
6767
ThreadPool.Names.SEARCH,
6868
ThreadPool.Names.SNAPSHOT,
69-
ThreadPool.Names.SUGGEST,
7069
ThreadPool.Names.WARMER
7170
};
7271

@@ -81,7 +80,6 @@ public class RestThreadPoolAction extends AbstractCatAction {
8180
"r",
8281
"s",
8382
"sn",
84-
"su",
8583
"w"
8684
};
8785

core/src/main/java/org/elasticsearch/threadpool/ThreadPool.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public static class Names {
8282
public static final String INDEX = "index";
8383
public static final String BULK = "bulk";
8484
public static final String SEARCH = "search";
85-
public static final String SUGGEST = "suggest";
8685
public static final String MANAGEMENT = "management";
8786
public static final String FLUSH = "flush";
8887
public static final String REFRESH = "refresh";
@@ -139,7 +138,6 @@ public static ThreadPoolType fromType(String type) {
139138
map.put(Names.INDEX, ThreadPoolType.FIXED);
140139
map.put(Names.BULK, ThreadPoolType.FIXED);
141140
map.put(Names.SEARCH, ThreadPoolType.FIXED);
142-
map.put(Names.SUGGEST, ThreadPoolType.FIXED);
143141
map.put(Names.MANAGEMENT, ThreadPoolType.SCALING);
144142
map.put(Names.FLUSH, ThreadPoolType.SCALING);
145143
map.put(Names.REFRESH, ThreadPoolType.SCALING);
@@ -227,7 +225,6 @@ public ThreadPool(Settings settings) {
227225
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.BULK).size(availableProcessors).queueSize(50));
228226
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.GET).size(availableProcessors).queueSize(1000));
229227
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.SEARCH).size(((availableProcessors * 3) / 2) + 1).queueSize(1000));
230-
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.SUGGEST).size(availableProcessors).queueSize(1000));
231228
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.MANAGEMENT).size(5).keepAlive("5m"));
232229
// no queue as this means clients will need to handle rejections on listener queue even if the operation succeeded
233230
// the assumption here is that the listeners should be very lightweight on the listeners side

core/src/test/java/org/elasticsearch/threadpool/ThreadPoolStatsTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public void testThreadPoolStatsToXContent() throws IOException {
6565
try (BytesStreamOutput os = new BytesStreamOutput()) {
6666

6767
List<ThreadPoolStats.Stats> stats = new ArrayList<>();
68-
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.SUGGEST, -1, 0, 0, 0, 0, 0L));
6968
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.SEARCH, -1, 0, 0, 0, 0, 0L));
7069
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.WARMER, -1, 0, 0, 0, 0, 0L));
7170
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.GENERIC, -1, 0, 0, 0, 0, 0L));
@@ -104,7 +103,6 @@ public void testThreadPoolStatsToXContent() throws IOException {
104103
ThreadPool.Names.GENERIC,
105104
ThreadPool.Names.SAME,
106105
ThreadPool.Names.SEARCH,
107-
ThreadPool.Names.SUGGEST,
108106
ThreadPool.Names.WARMER));
109107
}
110108
}

docs/reference/migration/migrate_5_0/settings.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ type for any thread pool has been removed. It is still possible to adjust
7171
relevant thread pool parameters for each of the thread pools (e.g., depending
7272
on the thread pool type, `keep_alive`, `queue_size`, etc.).
7373

74+
==== Threadpool settings
75+
76+
The `suggest` threadpool has been removed, now suggest requests use the
77+
`search` threadpool.
7478

7579
==== Analysis settings
7680

docs/reference/modules/threadpool.asciidoc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@ There are several thread pools, but the important ones include:
1919
queue_size of `200`.
2020

2121
`search`::
22-
For count/search operations. Thread pool type is `fixed`
22+
For count/search/suggest operations. Thread pool type is `fixed`
2323
with a size of `int((# of available_processors * 3) / 2) + 1`,
2424
queue_size of `1000`.
2525

26-
`suggest`::
27-
For suggest operations. Thread pool type is `fixed`
28-
with a size of `# of available processors`,
29-
queue_size of `1000`.
30-
3126
`get`::
3227
For get operations. Thread pool type is `fixed`
3328
with a size of `# of available processors`,

rest-api-spec/src/main/resources/rest-api-spec/test/cat.thread_pool/10_basic.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,6 @@
138138
/^ id \s+ snapshot.type \s+ snapshot.active \s+ snapshot.size \s+ snapshot.queue \s+ snapshot.queueSize \s+ snapshot.rejected \s+ snapshot.largest \s+ snapshot.completed \s+ snapshot.min \s+ snapshot.max \s+ snapshot.keepAlive \n
139139
(\S+ \s+ (cached|fixed|scaling)? \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d* \s+ \S* \n)+ $/
140140
141-
- do:
142-
cat.thread_pool:
143-
h: id,suggest.type,suggest.active,suggest.size,suggest.queue,suggest.queueSize,suggest.rejected,suggest.largest,suggest.completed,suggest.min,suggest.max,suggest.keepAlive
144-
v: true
145-
146-
- match:
147-
$body: |
148-
/^ id \s+ suggest.type \s+ suggest.active \s+ suggest.size \s+ suggest.queue \s+ suggest.queueSize \s+ suggest.rejected \s+ suggest.largest \s+ suggest.completed \s+ suggest.min \s+ suggest.max \s+ suggest.keepAlive \n
149-
(\S+ \s+ (cached|fixed|scaling)? \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d* \s+ \S* \n)+ $/
150-
151141
- do:
152142
cat.thread_pool:
153143
h: id,warmer.type,warmer.active,warmer.size,warmer.queue,warmer.queueSize,warmer.rejected,warmer.largest,warmer.completed,warmer.min,warmer.max,warmer.keepAlive

0 commit comments

Comments
 (0)