You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ahgittin <gi...@git.apache.org> on 2015/03/19 17:04:51 UTC

[GitHub] incubator-brooklyn pull request: group rescan should be triggered ...

GitHub user ahgittin opened a pull request:

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

    group rescan should be triggered by rebind, but not be in critical rebind path

    (since it might unmanage things, esp in the DynamicMultiGroup subclass,
    which causes deadlock, as it can't unmanage until management start transition completes)

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

    $ git pull https://github.com/ahgittin/incubator-brooklyn clocker-fixes-2

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

    https://github.com/apache/incubator-brooklyn/pull/559.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 #559
    
----
commit b15d2eb39cacae090e404ab527f0c1b24b544689
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Date:   2015-03-19T16:03:41Z

    group rescan should be triggered by rebind, but not be in critical rebind path
    
    (since it might unmanage things, esp in the DynamicMultiGroup subclass,
    which causes deadlock, as it can't unmanage until management start transition completes)

----


---
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.
---

[GitHub] incubator-brooklyn pull request: group rescan should be triggered ...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/559#issuecomment-83648841
  
    Looks good; only one very minor comment.


---
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.
---

[GitHub] incubator-brooklyn pull request: group rescan should be triggered ...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/559#discussion_r26770285
  
    --- Diff: core/src/main/java/brooklyn/entity/basic/DynamicGroupImpl.java ---
    @@ -163,13 +165,20 @@ public void onManagementBecomingMaster() {
             }
             setChangeListener = new MyEntitySetChangeListener();
             ((ManagementContextInternal) getManagementContext()).addEntitySetListener(setChangeListener);
    -        try {
    -            rescanEntities();
    -        } catch (Exception e) {
    -            log.warn("Error rescanning entities when rebinding; may be a group set against an unknown entity: "+e);
    -            log.debug("Trace for rescan entities error", e);
    -            Exceptions.propagateIfFatal(e);
    -        }
    +        Task<Object> rescan = Tasks.builder().name("rescan entities").body(
    +            new Runnable() {
    +                @Override
    +                public void run() {
    +                    try {
    +                        rescanEntities();
    +                    } catch (Exception e) {
    +                        log.warn("Error rescanning entities when rebinding; may be a group set against an unknown entity: "+e);
    --- End diff --
    
    This is not just called on rebind - it's called when the entity is very created+managed as well.
    Perhaps a better message would just be `"Error rescanning for members of "+DynamicGroupImpl.this+"; may be a ..."`


---
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.
---

[GitHub] incubator-brooklyn pull request: group rescan should be triggered ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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.
---