Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 94256200C6B for ; Mon, 27 Mar 2017 19:55:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 92CE8160B7B; Mon, 27 Mar 2017 17:55:01 +0000 (UTC) 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 E3BFB160B9A for ; Mon, 27 Mar 2017 19:55:00 +0200 (CEST) Received: (qmail 86141 invoked by uid 500); 27 Mar 2017 17:54:59 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 86007 invoked by uid 99); 27 Mar 2017 17:54:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Mar 2017 17:54:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CBD671AFE02 for ; Mon, 27 Mar 2017 17:54:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lV8CVXsDwUDR for ; Mon, 27 Mar 2017 17:54:58 +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 AD8FC5FDB4 for ; Mon, 27 Mar 2017 17:54:57 +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 CA980E0D53 for ; Mon, 27 Mar 2017 17:54:48 +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 D1042240A3 for ; Mon, 27 Mar 2017 17:54:42 +0000 (UTC) Date: Mon, 27 Mar 2017 17:54:42 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-2280) NettyServerCnxnFactory doesn't honor maxClientCnxns param MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 27 Mar 2017 17:55:01 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943732#comment-15943732 ] ASF GitHub Bot commented on ZOOKEEPER-2280: ------------------------------------------- Github user afine commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/208#discussion_r108230180 --- Diff: src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java --- @@ -524,17 +538,14 @@ public InetSocketAddress getLocalAddress() { private void addCnxn(NettyServerCnxn cnxn) { cnxns.add(cnxn); - synchronized (ipMap){ - InetAddress addr = - ((InetSocketAddress)cnxn.channel.getRemoteAddress()) - .getAddress(); - Set s = ipMap.get(addr); - if (s == null) { - s = new HashSet(); - } - s.add(cnxn); - ipMap.put(addr,s); + + InetAddress addr = ((InetSocketAddress)cnxn.channel.getRemoteAddress()).getAddress(); --- End diff -- I think it may be cleaner to inline this method instead of casting again. > NettyServerCnxnFactory doesn't honor maxClientCnxns param > --------------------------------------------------------- > > Key: ZOOKEEPER-2280 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2280 > Project: ZooKeeper > Issue Type: Bug > Components: server > Affects Versions: 3.4.6, 3.5.0, 3.5.1 > Reporter: Edward Ribeiro > Assignee: Edward Ribeiro > Fix For: 3.5.4, 3.6.0 > > Attachments: ZOOKEEPER-2280.2.patch, ZOOKEEPER-2280.patch > > > Even though NettyServerCnxnFactory has maxClientCnxns (default to 60) it doesn't enforce this limit in the code. -- This message was sent by Atlassian JIRA (v6.3.15#6346)