Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2097A166F7C for ; Tue, 22 Aug 2017 15:42:06 +0200 (CEST) Received: (qmail 63439 invoked by uid 500); 22 Aug 2017 13:42:03 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 63425 invoked by uid 99); 22 Aug 2017 13:42:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2017 13:42:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4F21D18072F for ; Tue, 22 Aug 2017 13:42:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id hULlfHiXEoTf for ; Tue, 22 Aug 2017 13:42:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8FF4461127 for ; Tue, 22 Aug 2017 13:42:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EEF9CE0AF9 for ; Tue, 22 Aug 2017 13:42:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4C67025386 for ; Tue, 22 Aug 2017 13:42:00 +0000 (UTC) Date: Tue, 22 Aug 2017 13:42:00 +0000 (UTC) From: "Joshua McKenzie (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-13693) A potential problem in the Ec2MultiRegionSnitch_gossiperStarting method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-13693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joshua McKenzie updated CASSANDRA-13693: ---------------------------------------- Component/s: Distributed Metadata > A potential problem in the Ec2MultiRegionSnitch_gossiperStarting method > ----------------------------------------------------------------------- > > Key: CASSANDRA-13693 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13693 > Project: Cassandra > Issue Type: Bug > Components: Distributed Metadata > Reporter: Hao Zhong > > The code of Ec2MultiRegionSnitch_gossiperStarting is as follow: > {code} > public void gossiperStarting() > { > super.gossiperStarting(); > Gossiper.instance.addLocalApplicationState(ApplicationState.INTERNAL_IP, StorageService.instance.valueFactory.internalIP(localPrivateAddress)); > Gossiper.instance.register(new ReconnectableSnitchHelper(this, ec2region, true)); > } > {code} > I notice that CASSANDRA-5897 fixed a bug, whose buggy code is identical. The fixed code is > {code} > public void gossiperStarting() > { > super.gossiperStarting(); > Gossiper.instance.addLocalApplicationState(ApplicationState.INTERNAL_IP, > StorageService.instance.valueFactory.internalIP(FBUtilities.getLocalAddress().getHostAddress())); > reloadGossiperState(); > gossipStarted = true; > } > private void reloadGossiperState() > { > if (Gossiper.instance != null) > { > ReconnectableSnitchHelper pendingHelper = new ReconnectableSnitchHelper(this, myDC, preferLocal); > Gossiper.instance.register(pendingHelper); > > pendingHelper = snitchHelperReference.getAndSet(pendingHelper); > if (pendingHelper != null) > Gossiper.instance.unregister(pendingHelper); > } > // else this will eventually rerun at gossiperStarting() > } > {code} > If Ec2MultiRegionSnitch is supposed to auto-reload, the above fix shall be applied to its code. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org