brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fix concurrent use of entity.setA...
Date Tue, 15 Dec 2015 22:13:33 GMT
GitHub user aledsage opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1110

    Fix concurrent use of entity.setAttribute()

    Previously we were using a vanilla LinkedHashMap for storing attributes
    (ever since the FEATURE_USE_BROOKLYN_LIVE_OBJECTS_DATAGRID_STORAGE
    was disabled by default!)
    
    Now uses synchronized set / synchronized map (rather than `ConcurrentMap`, as need to
accept null values), with underlying `LinkedHashSet` to preserve order.
    
    Adds `EntityConcurrencyTest` for concurrently:
    - setting attributes (previously failed fairly often)
    - setting config
    - adding tags
    - adding groups (previously failed sometimes)
    - adding children
    - adding locations
    - adding policies
    - adding enrichers
    - adding feeds

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

    $ git pull https://github.com/aledsage/incubator-brooklyn fix/concurrent-setAttribute

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

    https://github.com/apache/incubator-brooklyn/pull/1110.patch

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

    This closes #1110
    
----
commit b9f8dc1fc1ea9527705bc8ce1b54e66bfaaa9815
Author: Aled Sage <aled.sage@gmail.com>
Date:   2015-12-15T21:41:29Z

    Fix concurrent use of entity.setAttribute()
    
    Previously we were using a vanilla LinkedHashMap for storing attributes
    (ever since the FEATURE_USE_BROOKLYN_LIVE_OBJECTS_DATAGRID_STORAGE
    was disabled by default!)
    
    Now uses ConcurrentMap, or for some other things a synchronised set
    so that we preserve order with the underlying LinkedHashSet.
    
    Adds EntityConcurrencyTest for concurrently:
    - setting attributes
    - setting config
    - adding tags
    - adding groups
    - adding children
    - adding locations
    - adding policies
    - adding enrichers
    - adding feeds

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message