Skip to content

Commit aa3b9e8

Browse files
committed
Merge branch 'introduce-analyze-thread-pool' into remove-index-thread-pool
* introduce-analyze-thread-pool: Introduce analyze thread pool
2 parents 93f2cd6 + 21ff491 commit aa3b9e8

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

docs/reference/cat/thread_pool.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Which looks like:
1414

1515
[source,txt]
1616
--------------------------------------------------
17+
node-0 analyze 0 0 0
1718
node-0 bulk 0 0 0
1819
node-0 fetch_shard_started 0 0 0
1920
node-0 fetch_shard_store 0 0 0
@@ -43,6 +44,7 @@ The second column is the thread pool name
4344
[source,txt]
4445
--------------------------------------------------
4546
name
47+
analyze
4648
bulk
4749
fetch_shard_started
4850
fetch_shard_store

docs/reference/modules/threadpool.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ There are several thread pools, but the important ones include:
3030
with a size of `# of available processors`,
3131
queue_size of `1000`.
3232

33+
`analyze`::
34+
For analyze requests. Thread pool type is `fixed` with a size of 1, queue size of 16.
35+
3336
`bulk`::
3437
For bulk operations. Thread pool type is `fixed`
3538
with a size of `# of available processors`,

server/src/main/java/org/elasticsearch/action/admin/indices/analyze/TransportAnalyzeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public class TransportAnalyzeAction extends TransportSingleShardAction<AnalyzeRe
8585
public TransportAnalyzeAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService,
8686
IndicesService indicesService, ActionFilters actionFilters,
8787
IndexNameExpressionResolver indexNameExpressionResolver, Environment environment) {
88-
super(settings, AnalyzeAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, AnalyzeRequest::new, ThreadPool.Names.INDEX);
88+
super(settings, AnalyzeAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, AnalyzeRequest::new, ThreadPool.Names.ANALYZE);
8989
this.indicesService = indicesService;
9090
this.environment = environment;
9191
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static class Names {
6868
public static final String GENERIC = "generic";
6969
public static final String LISTENER = "listener";
7070
public static final String GET = "get";
71+
public static final String ANALYZE = "analyze";
7172
public static final String INDEX = "index";
7273
public static final String BULK = "bulk";
7374
public static final String SEARCH = "search";
@@ -173,6 +174,7 @@ public ThreadPool(final Settings settings, final ExecutorBuilder<?>... customBui
173174
builders.put(Names.INDEX, new FixedExecutorBuilder(settings, Names.INDEX, availableProcessors, 200, true));
174175
builders.put(Names.BULK, new FixedExecutorBuilder(settings, Names.BULK, availableProcessors, 200)); // now that we reuse bulk for index/delete ops
175176
builders.put(Names.GET, new FixedExecutorBuilder(settings, Names.GET, availableProcessors, 1000));
177+
builders.put(Names.ANALYZE, new FixedExecutorBuilder(settings, Names.ANALYZE, 1, 16));
176178
builders.put(Names.SEARCH, new AutoQueueAdjustingExecutorBuilder(settings,
177179
Names.SEARCH, searchThreadPoolSize(availableProcessors), 1000, 1000, 1000, 2000));
178180
builders.put(Names.MANAGEMENT, new ScalingExecutorBuilder(Names.MANAGEMENT, 1, 5, TimeValue.timeValueMinutes(5)));

0 commit comments

Comments
 (0)