When sending concurrent requests to a statistics enabled sequence, getting
"concurrent modification exception"
--------------------------------------------------------------------------------------------------------------
Key: SYNAPSE-853
URL: https://issues.apache.org/jira/browse/SYNAPSE-853
Project: Synapse
Issue Type: Bug
Components: Tracing and Statistics
Affects Versions: 2.1
Reporter: Vijayaratha Vijayasingam
Priority: Critical
Fix For: NIGHTLY
When sending concurrent requests(tps~=250) for a statistics enabled sequence,
I'm getting "ConcurrentModificationException" [1]
@ StatisticsRecord class, Arraylist(which is not thread safe), is used to
collect all statistics logs. ..
Instead of Arraylist, we can use "CopyOnWriteArrayList" which is thread safe
and allows multiple concurrent reads, and for reads to occur concurrently with
a write..
I tested with this option and did not notice any considerable performance
change..
[1][2012-03-14 22:10:16,398] ERROR - StatisticsReporterThread Error while
collecting and reporting mediation statistics
java.util.ConcurrentModificationException
at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at
org.apache.synapse.aspects.statistics.StatisticsRecord.getAllLogIds(StatisticsRecord.java:88)
at
org.apache.synapse.aspects.statistics.view.SystemViewStrategy.determineView(SystemViewStrategy.java:61)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]