From 2890432421eea212f84e26d487ac75a7f91da4d1 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 25 Nov 2015 18:32:56 +0100 Subject: [PATCH] made updatePipelines() to not make it prone to race conditions --- .../java/org/elasticsearch/plugin/ingest/PipelineStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java index 3bbddb1b842..fae1457ad12 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java @@ -122,7 +122,7 @@ public class PipelineStore extends AbstractLifecycleComponent { return factory.create(id, config, processorFactoryRegistry); } - void updatePipelines() throws IOException { + synchronized void updatePipelines() throws IOException { // note: this process isn't fast or smart, but the idea is that there will not be many pipelines, // so for that reason the goal is to keep the update logic simple.