GitHub user Jason918 added a comment to the discussion: Throttle the ledger 
rollover

@codelipenghui HI, I'll be happy to participate. 
Please check this more detailed solution.
Add a new parameter `managedLedgerRolloverRateLimit`, rate limit the amount of 
rollover per second in one broker. This parameter can be set as 0 by default 
meaning no rate limiting .

As `ManagedLedgerImpl#currentLedgerIsFull` is called before each ledger 
rollover, we can add a global rate limiter after that. Every ledger rollover 
can only happen when `currentLedgerIsFull()` and 
`rolloverRatelimiter.tryAcquire()` both return true.


GitHub link: 
https://github.com/apache/pulsar/discussions/18873#discussioncomment-4369973

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@pulsar.apache.org

Reply via email to