wuzhanpeng opened a new issue #7184:
URL: https://github.com/apache/pulsar/issues/7184


   ### Motivation
   Now in the `ManagedLedger`, even if the `maxLedgerRolloverTimeMinutes` is 
reached, the topic ledger will not trigger a new rollover until the next entry 
comes in. Thus the configuration does not actually take full effect. Another 
important idea here is, if we trigger a rollover, we can close the current 
ledger so that we can release the storage of current ledger btw. Because for 
some less commonly used topics, the current ledger data is likely to have 
expired, and the current rollover logic will only be triggered when adding a 
new entry. Obviously, this will result in a waste of disk space.
   
   **Is your feature request related to a problem? Please describe.**
   In current code logic the last created topic ledger will be never removed 
beacause the trimming stratege will not remove the current ledger. In such 
scenario, we will maintain a lot of useless data if the topic is no longer 
being used. Moreover, it may cause disk problem if we keep a lot mount of 
discarded topics in the cluster.
   Maybe related to #6935
   
   **Describe the solution you'd like**
   Add a new checker thread in `BrokerService` or `ManagedLedger` to 
periodically check if the current ledger is full.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to