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: group rescan should be triggered ...
Date Thu, 19 Mar 2015 16:19:47 GMT
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.
---

Mime
View raw message