From 795c6ed7fbd0989dd2f19e8963182332b123281b Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Wed, 20 Aug 2025 23:04:45 +0200 Subject: [PATCH] Use default thread pools for Fleet Integration Knowledge system index 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. --- .../java/org/elasticsearch/indices/ExecutorNames.java | 9 +++++++++ .../main/java/org/elasticsearch/xpack/fleet/Fleet.java | 3 +++ 2 files changed, 12 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/indices/ExecutorNames.java b/server/src/main/java/org/elasticsearch/indices/ExecutorNames.java index 2bfc642111d87..0939e06b4f393 100644 --- a/server/src/main/java/org/elasticsearch/indices/ExecutorNames.java +++ b/server/src/main/java/org/elasticsearch/indices/ExecutorNames.java @@ -17,6 +17,15 @@ */ public record ExecutorNames(String threadPoolForGet, String threadPoolForSearch, String threadPoolForWrite) { + /** + * The thread pools for typical indices and data streams. + */ + public static final ExecutorNames DEFAULT_INDEX_THREAD_POOLS = new ExecutorNames( + ThreadPool.Names.GET, + ThreadPool.Names.SEARCH, + ThreadPool.Names.WRITE + ); + /** * The thread pools for a typical system index. */ diff --git a/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java b/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java index 018082cb27832..888404bf19e03 100644 --- a/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java +++ b/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java @@ -280,6 +280,9 @@ private static SystemIndexDescriptor fleetIntegrationKnowledgeSystemIndexDescrip .setType(Type.EXTERNAL_MANAGED) .setAllowedElasticProductOrigins(ALLOWED_PRODUCTS) .setOrigin(FLEET_ORIGIN) + // This is a regular search index so it uses the shared thread pools. + // The only difference is that its mappings and settings are managed internally by Elasticsearch. + .setThreadPools(ExecutorNames.DEFAULT_INDEX_THREAD_POOLS) .setMappings(request.mappings()) .setSettings(request.settings()) .setPrimaryIndex(".integration_knowledge-" + CURRENT_INDEX_VERSION)