Skip to content

Commit 21471a1

Browse files
authored
Use default thread pools for Fleet Integration Knowledge system index (elastic#133265)
The Fleet Integration Knowledge index is a system index managed by Elasticsearch, but functionally it behaves like a regular search index. To align with this behavior, it should use the shared thread pools rather than the dedicated system thread pool. This ensures consistency with other search and ingest indices, while keeping the only distinction that it is managed internally by Elasticsearch.
1 parent f973aa2 commit 21471a1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

server/src/main/java/org/elasticsearch/indices/ExecutorNames.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
*/
1818
public record ExecutorNames(String threadPoolForGet, String threadPoolForSearch, String threadPoolForWrite) {
1919

20+
/**
21+
* The thread pools for typical indices and data streams.
22+
*/
23+
public static final ExecutorNames DEFAULT_INDEX_THREAD_POOLS = new ExecutorNames(
24+
ThreadPool.Names.GET,
25+
ThreadPool.Names.SEARCH,
26+
ThreadPool.Names.WRITE
27+
);
28+
2029
/**
2130
* The thread pools for a typical system index.
2231
*/

x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ private static SystemIndexDescriptor fleetIntegrationKnowledgeSystemIndexDescrip
280280
.setType(Type.EXTERNAL_MANAGED)
281281
.setAllowedElasticProductOrigins(ALLOWED_PRODUCTS)
282282
.setOrigin(FLEET_ORIGIN)
283+
// This is a regular search index so it uses the shared thread pools.
284+
// The only difference is that its mappings and settings are managed internally by Elasticsearch.
285+
.setThreadPools(ExecutorNames.DEFAULT_INDEX_THREAD_POOLS)
283286
.setMappings(request.mappings())
284287
.setSettings(request.settings())
285288
.setPrimaryIndex(".integration_knowledge-" + CURRENT_INDEX_VERSION)

0 commit comments

Comments
 (0)