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: add support for configuring couch...
Date Tue, 07 Oct 2014 09:08:04 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/221#discussion_r18507851
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
---
    @@ -397,30 +414,60 @@ public boolean isQuorate(int sizeHealthy, int totalSize) {
         
         protected void addServers(Set<Entity> serversToAdd) {
             Preconditions.checkNotNull(serversToAdd);
    -        for (Entity e : serversToAdd) {
    -            if (!isMemberInCluster(e)) {
    -                addServer(e);
    -            }
    +        for (Entity s : serversToAdd) {
    +            addServerSeveralTimes(s, 12, Duration.TEN_SECONDS);
    +        }
    +    }
    +
    +    /** try adding in a loop because we are seeing spurious port failures in AWS */
    +    protected void addServerSeveralTimes(Entity s, int numAttempts, Duration delayOnFailure)
{
    --- End diff --
    
    I think it actually does `numAttempts+1`. e.g. if you pass in `1`, then it will call `addServer`,
catch the exception, recurse with `0`, call `addServer`, and then throw the exception.


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