Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure when applying failed shards during local gateway allocation #903

kimchy opened this issue May 4, 2011 · 0 comments


Copy link

commented May 4, 2011

at java.util.HashMap$HashIterator.nextEntry(
at java.util.HashMap$
at org.elasticsearch.gateway.local.LocalGatewayNodeAllocation.buildShardStores(
at org.elasticsearch.gateway.local.LocalGatewayNodeAllocation.allocateUnassigned(
at org.elasticsearch.cluster.routing.allocation.NodeAllocations.allocateUnassigned(
at org.elasticsearch.cluster.routing.allocation.ShardsAllocation.reroute(
at org.elasticsearch.cluster.routing.allocation.ShardsAllocation.reroute(
at org.elasticsearch.cluster.routing.RoutingService$RoutingTableUpdater$1.execute(
at org.elasticsearch.cluster.service.InternalClusterService$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

Patch provided in mailing list:

--- a/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/local/
+++ b/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/local/
@@ -350,9 +350,10 @@ public class LocalGatewayNodeAllocation extends
NodeAllocation {
} else {
nodesIds = Sets.newHashSet();
// clean nodes that have failed
- for (DiscoveryNode node : shardStores.keySet()) {
- if (!nodes.nodeExists( {
- shardStores.remove(node);
+ for (Iterator i =
shardStores.keySet().iterator(); i.hasNext();) {
+ DiscoveryNode node =;
+ if (!nodes.nodeExists( {
+ i.remove();

@kimchy kimchy closed this in 3000dc7 May 4, 2011

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.