rdhabalia commented on a change in pull request #13073:
URL: https://github.com/apache/pulsar/pull/13073#discussion_r761289520



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -4012,4 +4018,12 @@ private void cancelScheduledTasks() {
         }
     }
 
+    private void checkInactiveLedgerAndRollOver(final long lastAddEntryTimeMs) 
{
+        long currentTimeMs = System.currentTimeMillis();
+        if (inactiveLedgerRollOverTimeMs > 0 && currentTimeMs > 
(lastAddEntryTimeMs + inactiveLedgerRollOverTimeMs)) {
+            log.info("[{}| Closing inactive ledger, last-add entry {}", name, 
lastAddEntryTimeMs);
+            ledgerClosed(currentLedger);

Review comment:
       `rollCurrentLedgerIfFull` closes ledger if its full and that won't be 
helpful in this case because ledger is not full but ledger inactivity criteria 
has been triggered.




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