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


##########
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:
   Do we need to check the state is `State.WriteFailed`? 
   
   ```
   else if (state == State.Closed) {
               addOperation.failed(new 
ManagedLedgerAlreadyClosedException("Managed ledger was already closed"));
               return;
           } else if (state == State.WriteFailed) {
               addOperation.failed(new 
ManagedLedgerAlreadyClosedException("Waiting to recover from failure"));
               return;
           }
   ```
   
   We also remove in this PR 
https://github.com/apache/pulsar/pull/14738/files#diff-4fb66809c520962f28616ddcab91aca0abb7aa04ee3ef0703097cf5976080ba8L166-L168
   
   @congbobo184 Do you remember the context?



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