[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150411#comment-16150411 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- GitHub user mfenes opened a pull request: https://github.com/apache/zookeeper/pull/355 ZOOKEEPER-2809: Unnecessary stack-trace in server when the client dis… Unnecessary stack-trace in server when the client disconnects unexpectedly. Backport from master, branch-3.5 to branch-3.4. Removes unnecessary stack traces from the catch blocks of method doIO in NIOServerCnxn. For EndOfStreamException stack trace is replaced with logging only the message and also contains the removal of stack traces for exceptions CancelledKeyException 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. 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 commit 81cd3cc42d85371bd24e427bedab1740695be819 Author: Mark Fenes Date: 2017-08-31T12:11:09Z ZOOKEEPER-2809: Unnecessary stack-trace in server when the client disconnect unexpectedly > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150470#comment-16150470 ] Hadoop QA commented on ZOOKEEPER-2809: -- +1 overall. GitHub Pull Request Build +1 @author. The patch does not contain any @author tags. +0 tests included. The patch appears to be a documentation patch that doesn't require tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/987//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/987//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/987//console This message is automatically generated. > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151154#comment-16151154 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- Github user afine commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/355#discussion_r136665164 --- Diff: src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java --- @@ -374,14 +373,12 @@ void doIO(SelectionKey k) throws InterruptedException { // expecting close to log session closure close(); } catch (EndOfStreamException e) { -LOG.warn("caught end of stream exception",e); // tell user why - +LOG.warn(e.getMessage()); --- End diff -- Do we want to log the whole stack trace if debug is enabled here? > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153740#comment-16153740 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- Github user mfenes commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/355#discussion_r137005402 --- Diff: src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java --- @@ -374,14 +373,12 @@ void doIO(SelectionKey k) throws InterruptedException { // expecting close to log session closure close(); } catch (EndOfStreamException e) { -LOG.warn("caught end of stream exception",e); // tell user why - +LOG.warn(e.getMessage()); --- End diff -- Yes, it would make sense to log the stack trace at debug level for EndOfStreamException too, so that we don't get less information in the log after this change is applied. The reason why I did not include it first, was to keep this change a pure backport from master and branch-3.5 to branch-3.4 as the original change does not include this additional logging statement. I've added it now, but probably then we should also add it to master as well if we wish to keep it. > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155439#comment-16155439 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- Github user mfenes closed the pull request at: https://github.com/apache/zookeeper/pull/355 > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155440#comment-16155440 ] 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… Unnecessary stack-trace in server when the client disconnects unexpectedly. Backport from master, branch-3.5 to branch-3.4. Removes unnecessary stack traces from the catch blocks of method doIO in NIOServerCnxn. For EndOfStreamException stack trace is replaced with logging only the message and also contains the removal of stack traces for exceptions CancelledKeyException 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. 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 > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155452#comment-16155452 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- Github user mfenes closed the pull request at: https://github.com/apache/zookeeper/pull/355 > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155453#comment-16155453 ] 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… Unnecessary stack-trace in server when the client disconnects unexpectedly. Backport from master, branch-3.5 to branch-3.4. Removes unnecessary stack traces from the catch blocks of method doIO in NIOServerCnxn. For EndOfStreamException stack trace is replaced with logging only the message and also contains the removal of stack traces for exceptions CancelledKeyException 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. 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 > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155507#comment-16155507 ] Hadoop QA commented on ZOOKEEPER-2809: -- +1 overall. GitHub Pull Request Build +1 @author. The patch does not contain any @author tags. +0 tests included. The patch appears to be a documentation patch that doesn't require tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1001//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1001//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1001//console This message is automatically generated. > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16162121#comment-16162121 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- Github user hanm commented on the issue: https://github.com/apache/zookeeper/pull/355 Committed to 3.4: 34665cd5bdbcb6aaeecb6b204028ef1ffab9f2d8 @mfenes Please close this pull request. > 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.4.11 > > > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ZOOKEEPER-2809) Unnecessary stack-trace in server when the client disconnect unexpectedly
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16192100#comment-16192100 ] ASF GitHub Bot commented on ZOOKEEPER-2809: --- Github user mfenes closed the pull request at: https://github.com/apache/zookeeper/pull/355 > 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.4.11 > > > 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/NIOServerCnxn.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 seems > 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 > branch, so could be included in the next 3.4 release. -- This message was sent by Atlassian JIRA (v6.4.14#64029)