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

java.util.ConcurrentModificationException could be sent by ingest service #18126

Closed
dadoonet opened this issue May 4, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@dadoonet
Copy link
Member

commented May 4, 2016

Elasticsearch version: 5.0.0-alpha2
Description of the problem including expected versus actual behavior: java.util.ConcurrentModificationException could be sent by ingest service
Provide logs (if relevant):

[2016-05-04 09:53:17,737][WARN ][cluster.service          ] [Airstrike] failed to notify ClusterStateListener
java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
    at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
    at org.elasticsearch.ingest.PipelineExecutionService.updatePipelineStats(PipelineExecutionService.java:127)
    at org.elasticsearch.ingest.PipelineExecutionService.clusterChanged(PipelineExecutionService.java:120)
    at org.elasticsearch.cluster.service.ClusterService.runTasksForExecutor(ClusterService.java:652)
    at org.elasticsearch.cluster.service.ClusterService$UpdateTask.run(ClusterService.java:814)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:392)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:237)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:200)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

According to @martijnvg:

removing an element from a map while iterating its keys causes this expection
instead an iterator should be used

@spinscale spinscale self-assigned this May 6, 2016

@spinscale spinscale removed the help wanted label May 6, 2016

spinscale added a commit to spinscale/elasticsearch that referenced this issue May 6, 2016

Pipeline Stats: Fix concurrent modification exception
Due to trying to modify a map while iterating it, a concurrent modification
in the pipeline stats could be thrown. This uses an iterator to prevent this.

Closes elastic#18126

spinscale added a commit that referenced this issue May 6, 2016

Pipeline Stats: Fix concurrent modification exception (#18177)
Due to trying to modify a map while iterating it, a concurrent modification
in the pipeline stats could be thrown. This uses an iterator to prevent this.

Closes #18126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.