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 2022/09/05 07:12:28 UTC

[GitHub] [pulsar] hrsakai commented on pull request #17432: [broker] Do not log stacktrace for 'Failed to flush mark-delete position' case

hrsakai commented on PR #17432:
URL: https://github.com/apache/pulsar/pull/17432#issuecomment-1236620722

   @eolivelli 
   I see.
   
   Checking for IllegalArgumentException in some logic, should we fix all of them?
   
   e.g.
   https://github.com/apache/pulsar/blob/46b1239a23fd2a250b009df1e9b4a65341d299a7/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java#L1559-L1577
   
   <br>
   Also, should new exception extend ManagedLedgerException?
   
   e.g.
   ```
   -              if (exception.getCause() instanceof MarkDeletingMarkedPosition) {
   +              if (exception instanceof MarkDeletingMarkedPosition) {
                       // this is not actually a problem, we should not log a stacktrace
                       log.info("[{}][{}] Cannot flush mark-delete position: {}", ledger.getName(),
                               name, exception.getCause().getMessage());
                   } else {
                       log.warn("[{}][{}] Failed to flush mark-delete position", ledger.getName(), name, exception);
                   }
   ```


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