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/03/08 13:31:13 UTC

[GitHub] [pulsar] lhotari commented on a change in pull request #14606: fix npe in handleAddFailure

lhotari commented on a change in pull request #14606:
URL: https://github.com/apache/pulsar/pull/14606#discussion_r821662736



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
##########
@@ -307,7 +307,9 @@ void handleAddFailure(final LedgerHandle lh) {
         finalMl.getExecutor().executeOrdered(finalMl.getName(), SafeRun.safeRun(() -> {
             // Force the creation of a new ledger. Doing it in a background thread to avoid acquiring ML lock
             // from a BK callback.
-            finalMl.ledgerClosed(lh);
+            if (finalMl != null) {

Review comment:
       how can `finalMl` ever be null? Wouldn't `finalMl.getName()` also fail?




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