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/01/26 09:00:02 UTC

[GitHub] [pulsar] Renkai opened a new pull request #9323: Expose more info with unknown exception

Renkai opened a new pull request #9323:
URL: https://github.com/apache/pulsar/pull/9323


   Improves error logs shown in https://github.com/apache/pulsar/issues/9266
   How to fix that issue will be decided after more information exposed


----------------------------------------------------------------
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] Renkai commented on pull request #9323: Expose more info with unknown exception

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] Renkai commented on pull request #9323: Expose more info with unknown exception

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] Renkai commented on pull request #9323: Expose more info with unknown exception

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] Renkai commented on a change in pull request #9323: Expose more info with unknown exception

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



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
##########
@@ -117,6 +115,7 @@ public void readEntriesFailed(ManagedLedgerException exception, Object ctx) {
             if (!(exception instanceof TooManyRequestsException)) {
                 log.warn("[{}][{}] read failed from ledger at position:{} : {}", cursor.ledger.getName(),
                         cursor.getName(), readPosition, exception.getMessage());
+                log.warn("error caused by: ", exception.getCause());

Review comment:
       @sijie 
   The slf4j API with `Throwable` only support one message string and one throwable parameter, but we still have other info to print. https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/Logger.java#L602
   
   By the way, the logger supports some advanced features like fold stacktrace when printing too frequently, so we'd better not format stacktrace ourselves.




----------------------------------------------------------------
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] Renkai commented on pull request #9323: Expose more info with unknown exception

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] merlimat commented on a change in pull request #9323: Expose more info with unknown exception

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



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
##########
@@ -117,6 +115,7 @@ public void readEntriesFailed(ManagedLedgerException exception, Object ctx) {
             if (!(exception instanceof TooManyRequestsException)) {
                 log.warn("[{}][{}] read failed from ledger at position:{} : {}", cursor.ledger.getName(),
                         cursor.getName(), readPosition, exception.getMessage());
+                log.warn("error caused by: ", exception.getCause());

Review comment:
       The last arg is always interpreted as an exception if it's of `Throwable` type




----------------------------------------------------------------
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] sijie commented on a change in pull request #9323: Expose more info with unknown exception

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



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
##########
@@ -117,6 +115,7 @@ public void readEntriesFailed(ManagedLedgerException exception, Object ctx) {
             if (!(exception instanceof TooManyRequestsException)) {
                 log.warn("[{}][{}] read failed from ledger at position:{} : {}", cursor.ledger.getName(),
                         cursor.getName(), readPosition, exception.getMessage());
+                log.warn("error caused by: ", exception.getCause());

Review comment:
       Why not just add the stacktrace to the previous `log.warn` statement?




----------------------------------------------------------------
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] 315157973 commented on pull request #9323: Expose more info with unknown exception

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


   LGTM


----------------------------------------------------------------
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] Renkai commented on a change in pull request #9323: Expose more info with unknown exception

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



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
##########
@@ -117,6 +115,7 @@ public void readEntriesFailed(ManagedLedgerException exception, Object ctx) {
             if (!(exception instanceof TooManyRequestsException)) {
                 log.warn("[{}][{}] read failed from ledger at position:{} : {}", cursor.ledger.getName(),
                         cursor.getName(), readPosition, exception.getMessage());
+                log.warn("error caused by: ", exception.getCause());

Review comment:
       Cool, I will move it up.




----------------------------------------------------------------
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] merlimat merged pull request #9323: Expose more info with unknown exception

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #9323:
URL: https://github.com/apache/pulsar/pull/9323


   


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