[
https://issues.apache.org/jira/browse/ARTEMIS-2095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631235#comment-16631235
]
ASF subversion and git services commented on ARTEMIS-2095:
----------------------------------------------------------
Commit da7fb89037481fb6343c760010d4553ff28ac87e in activemq-artemis's branch
refs/heads/2.6.x from [~teaandcoffee]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=da7fb89 ]
ARTEMIS-2095 - Typed Properties ThreadSafety
Add Concurrency Test to expose concurrency errors seen in logs.
Add Fix to ensure TypedProperties to ensure threadsafety
Add forEach and forEachKey to allow for provide a thread safe way of iterating
through keys and values, without needing to duplicate the collection.
Add getMapNames method to remove code duplication and to ensure thread safe
(cherry picked from commit 8e40b2d4f4f242271d3dfcda4f9b96d3f94cee1b)
This is properly applying the cherry pick that was done at
2aa7844d58b21f3772c08b41344888ff8380431c
> TypedProperties thread safety
> -----------------------------
>
> Key: ARTEMIS-2095
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2095
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.6.3
> Reporter: Michael Andre Pearce
> Assignee: Michael Andre Pearce
> Priority: Major
> Fix For: 2.7.0, 2.6.4
>
>
> Whilst TypedProperties is meant to have a single thread acting on it (and
> this is the most typical interaction), there are occurrences where, it can be
> acted on by other threads, when this occurs some concurrent modification
> errors can occur.
> As such TypedProperties must be thread safe, but concurrency tuning should
> factor in to be most performant for single thread.
>
> e.g.
> 2018-09-24 15:01:27,751 WARN
> [org.apache.activemq.artemis.core.message.impl.CoreMessage] Error creating
> String for message: : java.util.ConcurrentModificationException at
> java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) [rt.jar:1.8.0_102]
> at java.util.HashMap$EntryIterator.next(HashMap.java:1471) [rt.jar:1.8.0_102]
> at java.util.HashMap$EntryIterator.next(HashMap.java:1469) [rt.jar:1.8.0_102]
> at
> org.apache.activemq.artemis.utils.collections.TypedProperties.toString(TypedProperties.java:464)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)