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



##########
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:
       I meant to extract the code block inside the if




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