ConcurrentModificationException

I got the following exception several times 3 minutes after starting
the node:

[elasticsearch[Zuras]clusterService#updateTask-pool-11-thread-1] WARN
org.elasticsearch.cluster.service - [Zuras] failed to execute cluster
state update, state:
version [2789], source [routing-table-updater]
nodes:
[Chemistro][Gd7_Hzq1SOyq-0CNQkO-FQ][inet[/127.0.0.1:9304]]
[Mass Master][OE7HPdccSQKF3Nv9RB01NA][inet[/127.0.0.1:9301]]
[Zuras][4u7Pzq4mR6yBZEH7JGTYYw][inet[/127.0.0.1:9300]], local,
master
[Centurion][CAmAVyv0QyytFasDxIZfQA][inet[/127.0.0.1:9302]]
routing_table:
-- index [articleindex]
----shard_id [articleindex][0]
....
...
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at
org.elasticsearch.gateway.local.LocalGatewayNodeAllocation.buildShardStores(LocalGatewayNodeAllocation.java:
353)
at
org.elasticsearch.gateway.local.LocalGatewayNodeAllocation.allocateUnassigned(LocalGatewayNodeAllocation.java:
213)
at
org.elasticsearch.cluster.routing.allocation.NodeAllocations.allocateUnassigned(NodeAllocations.java:
80)
at
org.elasticsearch.cluster.routing.allocation.ShardsAllocation.reroute(ShardsAllocation.java:
147)
at
org.elasticsearch.cluster.routing.allocation.ShardsAllocation.reroute(ShardsAllocation.java:
99)
at org.elasticsearch.cluster.routing.RoutingService
$RoutingTableUpdater$1.execute(RoutingService.java:124)
at org.elasticsearch.cluster.service.InternalClusterService
$2.run(InternalClusterService.java:175)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Using 0.16 here.

Regards,
Peter.

Heya,

Already fixed in master and upcoming 0.16.1 (which will be released today).

-shay.banon
On Thursday, May 12, 2011 at 6:27 PM, Karussell wrote:

I got the following exception several times 3 minutes after starting
the node:

[elasticsearch[Zuras]clusterService#updateTask-pool-11-thread-1] WARN
org.elasticsearch.cluster.service - [Zuras] failed to execute cluster
state update, state:
version [2789], source [routing-table-updater]
nodes:
[Chemistro][Gd7_Hzq1SOyq-0CNQkO-FQ][inet[/127.0.0.1:9304]]
[Mass Master][OE7HPdccSQKF3Nv9RB01NA][inet[/127.0.0.1:9301]]
[Zuras][4u7Pzq4mR6yBZEH7JGTYYw][inet[/127.0.0.1:9300]], local,
master
[Centurion][CAmAVyv0QyytFasDxIZfQA][inet[/127.0.0.1:9302]]
routing_table:
-- index [articleindex]
----shard_id [articleindex][0]
....
...
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at
org.elasticsearch.gateway.local.LocalGatewayNodeAllocation.buildShardStores(LocalGatewayNodeAllocation.java:
353)
at
org.elasticsearch.gateway.local.LocalGatewayNodeAllocation.allocateUnassigned(LocalGatewayNodeAllocation.java:
213)
at
org.elasticsearch.cluster.routing.allocation.NodeAllocations.allocateUnassigned(NodeAllocations.java:
80)
at
org.elasticsearch.cluster.routing.allocation.ShardsAllocation.reroute(ShardsAllocation.java:
147)
at
org.elasticsearch.cluster.routing.allocation.ShardsAllocation.reroute(ShardsAllocation.java:
99)
at org.elasticsearch.cluster.routing.RoutingService
$RoutingTableUpdater$1.execute(RoutingService.java:124)
at org.elasticsearch.cluster.service.InternalClusterService
$2.run(InternalClusterService.java:175)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Using 0.16 here.

Regards,
Peter.