poorbarcode commented on code in PR #22034:
URL: https://github.com/apache/pulsar/pull/22034#discussion_r1494474646


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1754,10 +1754,7 @@ synchronized void ledgerClosed(final LedgerHandle lh) {
 
         maybeOffloadInBackground(NULL_OFFLOAD_PROMISE);
 
-        if (!pendingAddEntries.isEmpty()) {
-            // Need to create a new ledger to write pending entries
-            createLedgerAfterClosed();
-        }
+        createLedgerAfterClosed();

Review Comment:
   I wonder if we should close the old one and create a new one if the last 
ledger is empty.



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