|
19 | 19 |
|
20 | 20 | package org.elasticsearch.ingest; |
21 | 21 |
|
| 22 | +import org.apache.logging.log4j.LogManager; |
| 23 | +import org.apache.logging.log4j.Logger; |
22 | 24 | import org.elasticsearch.ElasticsearchParseException; |
23 | 25 | import org.elasticsearch.ExceptionsHelper; |
24 | 26 | import org.elasticsearch.ResourceNotFoundException; |
@@ -69,6 +71,8 @@ public class IngestService implements ClusterStateApplier { |
69 | 71 |
|
70 | 72 | public static final String NOOP_PIPELINE_NAME = "_none"; |
71 | 73 |
|
| 74 | + private static final Logger logger = LogManager.getLogger(IngestService.class); |
| 75 | + |
72 | 76 | private final ClusterService clusterService; |
73 | 77 | private final ScriptService scriptService; |
74 | 78 | private final Map<String, Processor.Factory> processorFactories; |
@@ -256,7 +260,11 @@ Map<String, Pipeline> pipelines() { |
256 | 260 | public void applyClusterState(final ClusterChangedEvent event) { |
257 | 261 | ClusterState state = event.state(); |
258 | 262 | Map<String, Pipeline> originalPipelines = pipelines; |
259 | | - innerUpdatePipelines(event.previousState(), state); |
| 263 | + try { |
| 264 | + innerUpdatePipelines(event.previousState(), state); |
| 265 | + } catch (ElasticsearchParseException e) { |
| 266 | + logger.warn("failed to update ingest pipelines", e); |
| 267 | + } |
260 | 268 | //pipelines changed, so add the old metrics to the new metrics |
261 | 269 | if (originalPipelines != pipelines) { |
262 | 270 | pipelines.forEach((id, pipeline) -> { |
|
0 commit comments