From 1bb0677df7a7d5d65e3e1a6b77bc4ef72580f7ac Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 29 Aug 2014 14:47:45 +0200 Subject: [PATCH] [CORE] Don't update indexShard if it has been removed before Today we have logic that removes a shard from the indexservice if the shard has changed ie. from replica to primary or if it's recovery source vanished etc. This can cause shards from been not allocated at all on a nodes causeing delete requests to timeout since we were waiting for shards on nodes that got dropped due to a IndexShardMissingException Closes #7509 --- .../indices/cluster/IndicesClusterStateService.java | 8 ++++++-- .../search/basic/SearchWithRandomExceptionsTests.java | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java b/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java index cb089f624a0..aa90e913a6b 100644 --- a/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java +++ b/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java @@ -43,6 +43,7 @@ import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.elasticsearch.common.compress.CompressedString; import org.elasticsearch.common.inject.Inject; +import org.elasticsearch.common.inject.Injector; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ConcurrentCollections; @@ -548,11 +549,13 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent