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/04/09 04:44:17 UTC

[GitHub] [pulsar] Jason918 commented on a diff in pull request #15090: [fix][broker] Fix npe in OpAddEntry#addComplete

Jason918 commented on code in PR #15090:
URL: https://github.com/apache/pulsar/pull/15090#discussion_r846574358


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java:
##########
@@ -165,7 +165,7 @@ public void addComplete(int rc, final LedgerHandle lh, long entryId, Object ctx)
             return;
         }
 
-        if (ledger.getId() != lh.getId()) {
+        if (lh != null && ledger != null && ledger.getId() != lh.getId()) {
             log.warn("[{}] ledgerId {} doesn't match with acked ledgerId {}", ml.getName(), ledger.getId(), lh.getId());
         }
         checkArgument(ledger.getId() == lh.getId(), "ledgerId %s doesn't match with acked ledgerId %s", ledger.getId(),

Review Comment:
   `ledger` and `lh` is used here too.



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