codelipenghui commented on code in PR #22221:
URL: https://github.com/apache/pulsar/pull/22221#discussion_r1606668065


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java:
##########
@@ -200,7 +210,7 @@ public void addComplete(int rc, final LedgerHandle lh, long 
entryId, Object ctx)
                     lh == null ? -1 : lh.getId(), entryId, dataLength, rc);
         }
 
-        if (rc != BKException.Code.OK) {
+        if (rc != BKException.Code.OK || timeoutTriggered.get()) {

Review Comment:
   If the new ledger has been created quickly, we will still get a chance to 
complete the OpAddEntry because the OpAddEntry and ManageLedgerImpl are shared 
the `currentLedgerTimeoutTriggered` object.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to