From ae2cb66680d7290b189ed55ef41fefade81b9bae Mon Sep 17 00:00:00 2001 From: David Roberts Date: Tue, 19 Mar 2024 18:54:20 +0000 Subject: [PATCH] Track down failure given that it OOMs the test harness --- .../xpack/ml/utils/InferenceProcessorInfoExtractor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/utils/InferenceProcessorInfoExtractor.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/utils/InferenceProcessorInfoExtractor.java index 5a2f044d1f7be..32d2fe40ea201 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/utils/InferenceProcessorInfoExtractor.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/utils/InferenceProcessorInfoExtractor.java @@ -13,6 +13,7 @@ import org.elasticsearch.ingest.ConfigurationUtils; import org.elasticsearch.ingest.IngestMetadata; import org.elasticsearch.ingest.Pipeline; +import org.elasticsearch.logging.LogManager; import org.elasticsearch.transport.Transports; import java.util.HashMap; @@ -76,7 +77,11 @@ public static int countInferenceProcessors(ClusterState state) { */ @SuppressWarnings("unchecked") public static Map> pipelineIdsByResource(ClusterState state, Set ids) { - assert Transports.assertNotTransportThread("non-trivial nested loops over cluster state structures"); + try { + assert Transports.assertNotTransportThread("non-trivial nested loops over cluster state structures"); + } catch (AssertionError e) { + LogManager.getLogger(InferenceProcessorInfoExtractor.class).fatal("should not be here", e); + } Map> pipelineIdsByModelIds = new HashMap<>(); Metadata metadata = state.metadata(); if (metadata == null) {