Skip to content

Commit 95c81e9

Browse files
authored
boundary: use ES API-stable LSIB#createThreadPool (#129)
Introduced on Elasticsearch `main` in elastic/elasticsearch#105163 and backported to `8.12` in elastic/elasticsearch#105163. Migrating to this stable API allows our build to work across the 8.12->8.13 boundary in which we observed a change to the ThreadPool's constructor. Resolves: #120
1 parent 933511b commit 95c81e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/co/elastic/logstash/filters/elasticintegration/EventProcessorBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.elasticsearch.core.TimeValue;
2626
import org.elasticsearch.env.Environment;
2727
import org.elasticsearch.ingest.IngestService;
28+
import org.elasticsearch.ingest.LogstashInternalBridge;
2829
import org.elasticsearch.ingest.Processor;
2930
import org.elasticsearch.ingest.common.IngestCommonPlugin;
3031
import org.elasticsearch.ingest.useragent.IngestUserAgentPlugin;
@@ -237,7 +238,7 @@ synchronized EventProcessor build(final PluginContext pluginContext) {
237238
try {
238239
final ArrayList<Service> services = new ArrayList<>();
239240

240-
final ThreadPool threadPool = new ThreadPool(settings);
241+
final ThreadPool threadPool = LogstashInternalBridge.createThreadPool(settings);
241242
resourcesToClose.add(() -> ThreadPool.terminate(threadPool, 10, TimeUnit.SECONDS));
242243

243244
final ScriptService scriptService = initScriptService(settings, threadPool);

0 commit comments

Comments
 (0)