You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by mfenes <gi...@git.apache.org> on 2017/09/01 12:02:53 UTC

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

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 <mf...@cloudera.com>
Date:   2017-08-31T12:11:09Z

    ZOOKEEPER-2809: Unnecessary stack-trace in server when the client disconnect unexpectedly

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by mfenes <gi...@git.apache.org>.
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.


---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by mfenes <gi...@git.apache.org>.
Github user mfenes closed the pull request at:

    https://github.com/apache/zookeeper/pull/355


---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by mfenes <gi...@git.apache.org>.
Github user mfenes closed the pull request at:

    https://github.com/apache/zookeeper/pull/355


---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by afine <gi...@git.apache.org>.
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper issue #355: ZOOKEEPER-2809: Unnecessary stack-trace in server when...

Posted by hanm <gi...@git.apache.org>.
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.


---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by mfenes <gi...@git.apache.org>.
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
    
----

----


---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by mfenes <gi...@git.apache.org>.
Github user mfenes closed the pull request at:

    https://github.com/apache/zookeeper/pull/355


---

[GitHub] zookeeper pull request #355: ZOOKEEPER-2809: Unnecessary stack-trace in serv...

Posted by mfenes <gi...@git.apache.org>.
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
    
----

----


---