From dev-return-30531-archive-asf-public=cust-asf.ponee.io@geode.apache.org Tue Jan 15 01:45:35 2019 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 mx-eu-01.ponee.io (Postfix) with SMTP id C0582180608 for ; Tue, 15 Jan 2019 01:45:34 +0100 (CET) Received: (qmail 13369 invoked by uid 500); 15 Jan 2019 00:45:33 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 13358 invoked by uid 99); 15 Jan 2019 00:45:33 -0000 Received: from mail-relay.apache.org (HELO mailrelay2-lw-us.apache.org) (207.244.88.137) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jan 2019 00:45:33 +0000 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by mailrelay2-lw-us.apache.org (ASF Mail Server at mailrelay2-lw-us.apache.org) with ESMTPSA id 65AB225BE for ; Tue, 15 Jan 2019 00:45:32 +0000 (UTC) Received: by mail-oi1-f200.google.com with SMTP id h85so449049oib.9 for ; Mon, 14 Jan 2019 16:45:32 -0800 (PST) X-Gm-Message-State: AJcUukcG3YB+QOkzza37pRFLd0MthfggEsWL3ckOrA+C8NN4JOFlSIhJ 507ypSo5nT5V/nGqY9vhnLqJKtKYs4wngXJEopmn1EbMlLLUmEdwZL67kcytgIWY3odI1lUlCLs gQXmt5ZIeXvhTuzWKCBtXYTgq0Z+1hFPzwUTwKQ6uEvQaGSyxEvMZYK4= X-Received: by 2002:aca:5c87:: with SMTP id q129mr608556oib.189.1547513131601; Mon, 14 Jan 2019 16:45:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN4j4WEFfs+igPd39Z6JjWLjcgfYQzLqn5jnhEPvo7nAglg6mlJQ860ZHleiVcPzQ0SSz+GP2bTnyJUL4qbYmOw= X-Received: by 2002:aca:5c87:: with SMTP id q129mr608554oib.189.1547513131482; Mon, 14 Jan 2019 16:45:31 -0800 (PST) MIME-Version: 1.0 From: Kirk Lund Date: Mon, 14 Jan 2019 16:45:20 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Loner changes its membership port when starting an acceptor To: geode Content-Type: multipart/alternative; boundary="0000000000007cd9bd057f747a2e" --0000000000007cd9bd057f747a2e Content-Type: text/plain; charset="UTF-8" So I was stepping through some WAN tests in IJ debugger (on develop with no changes) and discovered that any MXBeans that are created before starting a server port (either using CacheServer or GatewayReceiver) are broken and fail to be updated after that -- the ObjectNames include the DistributedMember.getName(). Turns out some JMX code is eating an NPE that's caused because the LonerDistributionManager changes its membership port when an acceptor endpoint is started up. Below is the method in LonerDistributionManager (with some other issues as well) that does this updating. We either need to make a lot of changes to the JMX code to fix this or we need to make one small change to LonerDistributionManager (ie, to delete this method). Question: do we really need the DistributedMember of a Loner to change its getName() which includes the membership port that changed? /** * update the loner port with an integer that may be more unique than the default port (zero). * This updates the ID in place and establishes new default settings for the manufacture of new * IDs. * * @param newPort the new port to use */ public void updateLonerPort(int newPort) { this.logger.config( String.format("Updating membership port. Port changed from %s to %s. ID is now %s", new Object[] {this.lonerPort, newPort, getId()})); this.lonerPort = newPort; *this.getId().setPort(this.lonerPort);* } --0000000000007cd9bd057f747a2e--