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

2017-10-04 Thread mfenes
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...

2017-09-06 Thread mfenes
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...

2017-09-06 Thread mfenes
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...

2017-09-06 Thread mfenes
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...

2017-09-06 Thread mfenes
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...

2017-09-05 Thread mfenes
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...

2017-09-01 Thread afine
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2017-09-01 Thread mfenes
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




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---