315157973 commented on a change in pull request #11116: URL: https://github.com/apache/pulsar/pull/11116#discussion_r659859148
########## File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java ########## @@ -3361,7 +3359,7 @@ private boolean currentLedgerIsFull() { || currentLedgerSize >= (config.getMaxSizePerLedgerMb() * MegaByte)); long timeSinceLedgerCreationMs = clock.millis() - lastLedgerCreatedTimestamp; - boolean maxLedgerTimeReached = timeSinceLedgerCreationMs >= maximumRolloverTimeMs; + boolean maxLedgerTimeReached = timeSinceLedgerCreationMs >= config.getMaximumRolloverTimeMs(); Review comment: https://github.com/apache/pulsar/blob/da66d0e2212c99a5a7e346c38778af0f1276e7d1/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L309 https://github.com/apache/pulsar/blob/da66d0e2212c99a5a7e346c38778af0f1276e7d1/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L3471-L3473 Your current time is fixed, the previous time is floating. Anyway, I think we need to avoid deleting at the same time. "control the scheduled task" is work for me -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org