Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B65517ED9 for ; Wed, 18 Feb 2015 10:54:35 +0000 (UTC) Received: (qmail 82688 invoked by uid 500); 18 Feb 2015 10:54:25 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 82651 invoked by uid 500); 18 Feb 2015 10:54:25 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 82638 invoked by uid 99); 18 Feb 2015 10:54:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2015 10:54:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 18 Feb 2015 10:54:24 +0000 Received: (qmail 80378 invoked by uid 99); 18 Feb 2015 10:54:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2015 10:54:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D493CE03E8; Wed, 18 Feb 2015 10:54:03 +0000 (UTC) From: aledsage To: dev@brooklyn.incubator.apache.org Reply-To: dev@brooklyn.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-brooklyn pull request: set IS_IN_CLUSTER on couchbase pr... Content-Type: text/plain Message-Id: <20150218105403.D493CE03E8@git1-us-west.apache.org> Date: Wed, 18 Feb 2015 10:54:03 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user aledsage commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/488#discussion_r24893169 --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java --- @@ -229,8 +229,13 @@ protected void doStart() { } ((CouchbaseNode)getPrimaryNode()).rebalance(); - } else if (getQuorumSize()>1) { - log.warn(this+" is not quorate; will likely fail later, but proceeding for now"); + } else { + if (getQuorumSize()>1) { + log.warn(this+" is not quorate; will likely fail later, but proceeding for now"); + } + if (!serversToAdd.isEmpty()) { + ((EntityInternal) Iterables.getOnlyElement(serversToAdd)).setAttribute(CouchbaseNode.IS_IN_CLUSTER, true); --- End diff -- How do you know that `serversToAdd` will only have one element? If quorum size was 3, then presumably you could get into this code path with serversToAdd having size 2? --- 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. ---