Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/782#discussion_r36163604
  
    --- Diff: 
software/nosql/src/main/java/brooklyn/entity/nosql/redis/RedisClusterImpl.java 
---
    @@ -72,12 +120,12 @@ public void restart() {
             throw new UnsupportedOperationException();
         }
     
    -    protected boolean calculateServiceUp() {
    -        boolean up = false;
    -        for (Entity member : slaves.getMembers()) {
    -            if (Boolean.TRUE.equals(member.getAttribute(SERVICE_UP))) up = 
true;
    -        }
    -        return up;
    -    }
    +    private boolean calculateServiceUp() {
    +        if (!Boolean.TRUE.equals(getMaster().getAttribute(SERVICE_UP))) 
return false;
     
    +        for (Entity member : getSlaves().getMembers())
    --- End diff --
    
    Also can replace the manual checks with enricher (in `initEnrichers`)
    ```
    
ServiceStateLogic.newEnricherFromChildrenUp().checkChildrenOnly().requireUpChildren(QuorumChecks.all()).addTo(this);
    ```
    
    Where `QuorumChecks` is in `brooklyn.util.collections.QuorumCheck`.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to