poorbarcode commented on code in PR #24722:
URL: https://github.com/apache/pulsar/pull/24722#discussion_r2347423147
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1878,10 +1878,38 @@ protected synchronized void
updateLedgersIdsComplete(@Nullable LedgerHandle orig
}
}
+ void ledgerAddFailedDueToConcurrentlyModified(final LedgerHandle
currentLedger) {
Review Comment:
I have changed the behaviour: the topic should be fenced if the ledger was
modified by someone else.
After reviewing the code, I got another case: auto-replication may close an
active ledger if it is not in write-in-flight state. So Pulsar need to work
continuously if the LAC re-checking is successful.
> Does this get called multiple times for each failure? would that result in
attempts to open the ledger multiple times in a row?
I have added a mechanism to prevent it. And I have added more tests
--
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]