gaoran10 commented on a change in pull request #14738:
URL: https://github.com/apache/pulsar/pull/14738#discussion_r829731935



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStore.java
##########
@@ -282,6 +283,12 @@ public void markDeleteFailed(ManagedLedgerException 
exception, Object ctx) {
             public void addFailed(ManagedLedgerException exception, Object 
ctx) {
                 log.error("[{}][{}] MLPendingAckStore message append fail 
exception : {}, operation : {}",
                         managedLedger.getName(), ctx, exception, 
pendingAckMetadataEntry.getPendingAckOp());
+
+                if (exception instanceof 
ManagedLedgerException.ManagedLedgerAlreadyClosedException
+                        && managedLedger instanceof ManagedLedgerImpl
+                        && ManagedLedgerImpl.State.WriteFailed == 
((ManagedLedgerImpl) managedLedger).getState()) {

Review comment:
       Do we need this check? The method `readyToCreateNewLedger ` will compare 
and set the state.




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