You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/05/19 15:47:32 UTC

[GitHub] [geode] bschuchardt opened a new pull request #5132: GEODE-8131: reader thread blocked attempting to issue an alert

bschuchardt opened a new pull request #5132:
URL: https://github.com/apache/geode/pull/5132


   This PR does not solve the problem of the alert system causing a P2P
   message reader to block but instead ensures that the reader thread will
   write deserialization information to the log before issuing a fatal
   alert.  If the alert level is set to "info" this won't help, but no-one
   would set the alert level to that level.
   
   Along the way I removed some duplicate strings.
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] bschuchardt commented on a change in pull request #5132: GEODE-8131: reader thread blocked attempting to issue an alert

Posted by GitBox <gi...@apache.org>.
bschuchardt commented on a change in pull request #5132:
URL: https://github.com/apache/geode/pull/5132#discussion_r428776911



##########
File path: geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
##########
@@ -3027,13 +3027,17 @@ private void readMessage(ByteBuffer peerDataBuffer) {
         failureMsg = "ClassNotFound deserializing message";
         failureEx = ex;
         rpId = md.getRPid();
-        logger.fatal("ClassNotFound deserializing message: {}", ex.toString());
+        // log at info level first in case fatal-level alert notification becomes blocked
+        logger.info(failureMsg, failureEx);
+        logger.fatal(failureMsg, failureEx.toString());

Review comment:
       Beats me why the toString is there - I didn't add it.  I do want to see the full call stack when triaging a problem like this.  Maybe it has to do with alert listeners wanting one-liners?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] Bill commented on a change in pull request #5132: GEODE-8131: reader thread blocked attempting to issue an alert

Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5132:
URL: https://github.com/apache/geode/pull/5132#discussion_r428154132



##########
File path: geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
##########
@@ -3054,7 +3058,9 @@ private void readMessage(ByteBuffer peerDataBuffer) {
         failureMsg = "Unexpected failure deserializing message";
         failureEx = ex;
         rpId = md.getRPid();
-        logger.fatal("Unexpected failure deserializing message", failureEx);
+        // log at info level first in case fatal-level alert notification becomes blocked
+        logger.info(failureMsg, failureEx);
+        logger.fatal(failureMsg, failureEx);

Review comment:
       Instead of repeating this code in three places, comment-and-all, it would be better to have the three sites call a new method e.g. `logFatal(…)`. The method could have a block comment telling about what it's contract is etc.

##########
File path: geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
##########
@@ -3027,13 +3027,17 @@ private void readMessage(ByteBuffer peerDataBuffer) {
         failureMsg = "ClassNotFound deserializing message";
         failureEx = ex;
         rpId = md.getRPid();
-        logger.fatal("ClassNotFound deserializing message: {}", ex.toString());
+        // log at info level first in case fatal-level alert notification becomes blocked
+        logger.info(failureMsg, failureEx);
+        logger.fatal(failureMsg, failureEx.toString());

Review comment:
       why is `toString()` called explicitly in this case but not in the other two?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] bschuchardt merged pull request #5132: GEODE-8131: reader thread blocked attempting to issue an alert

Posted by GitBox <gi...@apache.org>.
bschuchardt merged pull request #5132:
URL: https://github.com/apache/geode/pull/5132


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org