samoa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgrzenda <>
Subject [GitHub] incubator-samoa pull request #68: SAMOA-71: fixes concurrency issues in Hori...
Date Wed, 19 Jul 2017 13:36:42 GMT
GitHub user mgrzenda opened a pull request:

    SAMOA-71: fixes concurrency issues in HorizontalAMRulesRegressor

    I suggest a change in ruleSet implementation from LinkedList (providing fail-fast iterators,
which causes ConcurrencyException when list content changes during iterating over it) to CopyOnWriteArrayList
(which is a thread-safe variant eliminating concurrency exceptions). In the analysed case,
the modifications to ruleSet are expected to be much less frequent than reading the rules.
When the number of read operations is relatively large and update operations are far less
frequent, a possible choice is CopyOnWriteArrayList.
    I have compared the performance on 35k instance streams (with a higher than 35k number
concurrency exception got thrown) and got the same <1 second processing time. Hence, the
possible negative impact on the performance can be considered negligible, if any. Still, suggestions
and possible other solution ideas from designers of AMRules are welcome.

You can merge this pull request into a Git repository by running:

    $ git pull SAMOA-71

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #68
commit b2ebe028bf2fc24b9f41605d5075f6706c6e6e3d
Author: Maciej Grzenda <>
Date:   2017-07-19T13:12:35Z

    SAMOA-71: fixes concurrency issues in HorizontalAMRulesRegressor


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message