You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/20 21:40:21 UTC

[GitHub] [pulsar] devinbost opened a new pull request #10290: [Functions] Added more details to error message to assist with debugging exceptions

devinbost opened a new pull request #10290:
URL: https://github.com/apache/pulsar/pull/10290


   After updating the brokers in a test cluster from 2.6.3 to an image built from master, all functions in the cluster are restarting with the error "Source open produced uncaught exception". The purpose of this commit is to add additional debugging detail to assist with troubleshooting this error because heap dumps don't provide the contents of ContextImpl at the point of the failure. 


-- 
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] [pulsar] lhotari commented on a change in pull request #10290: [Functions] Added more details to error message to assist with debugging exceptions

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #10290:
URL: https://github.com/apache/pulsar/pull/10290#discussion_r618083255



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
##########
@@ -711,7 +711,9 @@ private void setupInput(ContextImpl contextImpl) throws Exception {
                         }.getType()), contextImpl);
             }
         } catch (Exception e) {
-            log.error("Source open produced uncaught exception: ", e);
+            log.error("Source open produced uncaught exception with ContextImpl of {}. "
+                            + "sourceSpec is {}. Exception is {}.",

Review comment:
       remove the `Exception is {}.` part since that's not necessary. Here's the relevant FAQ entry in SLF4J documentation: http://slf4j.org/faq.html#paramException .




-- 
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] [pulsar] codelipenghui commented on pull request #10290: [Functions] Added more details to error message to assist with debugging exceptions

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #10290:
URL: https://github.com/apache/pulsar/pull/10290#issuecomment-1058891313


   The pr had no activity for 30 days, mark with Stale label.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari commented on a change in pull request #10290: [Functions] Added more details to error message to assist with debugging exceptions

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #10290:
URL: https://github.com/apache/pulsar/pull/10290#discussion_r618083732



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
##########
@@ -711,7 +711,9 @@ private void setupInput(ContextImpl contextImpl) throws Exception {
                         }.getType()), contextImpl);
             }
         } catch (Exception e) {
-            log.error("Source open produced uncaught exception: ", e);
+            log.error("Source open produced uncaught exception with ContextImpl of {}. "
+                            + "sourceSpec is {}. Exception is {}.",
+                    contextImpl.toString(), sourceSpec.toString(), e);

Review comment:
       calling `.toString()` isn't necessary since the logger will do that when you pass an object. There's another FAQ entry about that: http://slf4j.org/faq.html#string_contents




-- 
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] [pulsar] jerrypeng commented on a change in pull request #10290: [Functions] Added more details to error message to assist with debugging exceptions

Posted by GitBox <gi...@apache.org>.
jerrypeng commented on a change in pull request #10290:
URL: https://github.com/apache/pulsar/pull/10290#discussion_r627924922



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
##########
@@ -711,7 +711,9 @@ private void setupInput(ContextImpl contextImpl) throws Exception {
                         }.getType()), contextImpl);
             }
         } catch (Exception e) {
-            log.error("Source open produced uncaught exception: ", e);
+            log.error("Source open produced uncaught exception with ContextImpl of {}. "
+                            + "sourceSpec is {}. Exception is {}.",

Review comment:
       Printing the sourceSpec here is unnecessary. sourceSpec source already be printed when the function first starts.




-- 
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] [pulsar] github-actions[bot] commented on pull request #10290: [Functions] Added more details to error message to assist with debugging exceptions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #10290:
URL: https://github.com/apache/pulsar/pull/10290#issuecomment-1058891522


   @devinbost:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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