From c8233550145086a5eaaf65e05670599b65057705 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 15 May 2011 12:52:17 +0300 Subject: [PATCH] Deleting and recreating a new index with dynamic mapping can cause type failures, closes #931. --- .../indices/cluster/IndicesClusterStateService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java index 46a222007db..56e16010a33 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java @@ -94,7 +94,8 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent, Boolean> seenMappings = ConcurrentCollections.newConcurrentMap(); private final Object mutex = new Object(); @@ -198,6 +199,12 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent tuple : seenMappings.keySet()) { + if (tuple.v1().equals(index)) { + seenMappings.remove(tuple); + } + } } } }