315157973 commented on a change in pull request #12223:
URL: https://github.com/apache/pulsar/pull/12223#discussion_r718381550
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -1581,7 +1581,7 @@ synchronized void ledgerClosed(final LedgerHandle lh) {
maybeOffloadInBackground(NULL_OFFLOAD_PROMISE);
- if (!pendingAddEntries.isEmpty()) {
+ if (!pendingAddEntries.isEmpty() &&
isNeededCreateNewLedgerAfterCloseLedger()) {
// Need to create a new ledger to write pending entries
Review comment:
It is necessary, but the code is duplicate with
createLedgerAfterClosed(). Can we call createLedgerAfterClosed directly
--
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]