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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java:
##########
@@ -375,6 +377,12 @@ public void addFailed(ManagedLedgerException exception, 
Object ctx) {
         return completableFuture;
     }
 
+    private void checkAppendMarkerException(ManagedLedgerException exception) {
+        if (exception instanceof 
ManagedLedgerException.ManagedLedgerAlreadyClosedException) {
+            topic.getManagedLedger().readyToCreateNewLedger();

Review Comment:
   Sorry, I mean if we get a `ManagedLedgerAlreadyClosedException`, it can be 
`State.Closed` and `State.WriteFailed`. We only need to call 
`readyToCreateNewLedger()` for `State.WriteFailed` but not the `State.Closed`? 
Because `State.Closed` means the managed ledger is closed, it not equals to the 
`State.ClosedLedger`



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