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 2047A200CFD for ; Wed, 6 Sep 2017 16:34:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1EED516171A; Wed, 6 Sep 2017 14:34:11 +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 6441A161BF1 for ; Wed, 6 Sep 2017 16:34:10 +0200 (CEST) Received: (qmail 17285 invoked by uid 500); 6 Sep 2017 14:34:09 -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 17257 invoked by uid 99); 6 Sep 2017 14:34:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2017 14:34:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2A113D6567 for ; Wed, 6 Sep 2017 14:34:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Jf7R3HlqDcOd for ; Wed, 6 Sep 2017 14:34: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 58E055F257 for ; Wed, 6 Sep 2017 14:34:02 +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 AD19AE09A5 for ; Wed, 6 Sep 2017 14:34:01 +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 C7DEA24167 for ; Wed, 6 Sep 2017 14:34:00 +0000 (UTC) Date: Wed, 6 Sep 2017 14:34:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Sep 2017 14:34:11 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 16155440#comment-16155440 ]=20 ASF GitHub Bot commented on ZOOKEEPER-2809: ------------------------------------------- GitHub user mfenes reopened a pull request: https://github.com/apache/zookeeper/pull/355 ZOOKEEPER-2809: Unnecessary stack-trace in server when the client dis= =E2=80=A6 Unnecessary stack-trace in server when the client disconnects unexpecte= dly. =20 Backport from master, branch-3.5 to branch-3.4. Removes unnecessary sta= ck traces from the catch blocks of method doIO in NIOServerCnxn. For EndOfS= treamException stack trace is replaced with logging only the message and al= so contains the removal of stack traces for exceptions CancelledKeyExceptio= n and IOException as per commit 6206b495 referenced in the ticket. This change is necessary as there are projects which consider all stack= traces as bugs.=20 For CancelledKeyException and IOException developers are still able to = see stack traces at log level Debug. This change is in sync with master and branch-3.5. You can merge this pull request into a Git repository by running: $ git pull https://github.com/mfenes/zookeeper ZOOKEEPER-2809 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zookeeper/pull/355.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #355 =20 ---- ---- > Unnecessary stack-trace in server when the client disconnect unexpectedly > ------------------------------------------------------------------------- > > Key: ZOOKEEPER-2809 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2809 > Project: ZooKeeper > Issue Type: Bug > Components: server > Affects Versions: 3.4.8 > Reporter: Paul Millar > Assignee: Mark Fenes > Priority: Minor > Fix For: 3.5.0 > > > In ZK 3.4.x, if the client disconnects unexpectedly then the server logs = this with a stack-trace (see src/java/main/org/apache/zookeeper/server/NIOS= erverCnxn.java:356). > This is unfortunate as we are using an embedded ZK server in our project = (in a test environment) and we consider all stack-traces as bugs. > I noticed that ZK 3.5 and later no longer log a stack-trace. This change= is due to commit 6206b495 (in branch-3.5), which adds ZOOKEEPER-1504 and s= eems to fix this issue almost as a side-effect; a similar change in master = has the same effect. > I was wondering if the change in how EndOfStreamException is logged (i.e.= , logging the message without a stack-trace) could be back-ported to 3.4 br= anch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)