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


##########
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.isTrue()) {

Review Comment:
   > If 1 is timeout, the value of currentLedgerTimeoutTriggered will set to be 
true, and switch to a new ledger.
   After 2 is finished, the value of currentLedgerTimeoutTriggered is true, it 
will also switch to a new ledger.
   Same as 3.
   
   After a ledger switch, the variable `currentLedgerTimeoutTriggered ` will be 
recreated 
[here](https://github.com/apache/pulsar/pull/22221/files#diff-f6a849bd8fdb782ef6c17a2e07a2c54c3dc7d1655c00ec3546d5f3b3fc61e970R1596)



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