poorbarcode opened a new pull request, #17257:
URL: https://github.com/apache/pulsar/pull/17257

   ### Motivation
   
   `ManagedLedgerMBeanImpl` will execute method `refreshStats` immediately 
after it is created, but if `refreshStats` is executed too fast, will throws 
`IllegalArgumentException`.
   
   - `refreshStats` execute immediately
   
https://github.com/apache/pulsar/blob/fd9489771959f3e722656e4b70d4bd891a13f690/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java#L198-L199
   
   - throw `IllegalArgumentException` if executed too fast
   
https://github.com/apache/pulsar/blob/1de80e0684ec5c13b6edcd217af62d74d8677f04/pulsar-common/src/main/java/org/apache/pulsar/common/stats/Rate.java#L62-L64
   
   `ManagedLedgerMBeanImpl.refreshStats` will immediatelly execute after create
   
   ### Modifications
   
   Skip refreshing stats like `ManagedLedgerFactoryMBeanImpl.refreshStats`
   
   
https://github.com/apache/pulsar/blob/1de80e0684ec5c13b6edcd217af62d74d8677f04/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryMBeanImpl.java#L38-L44
   
   ### Documentation
   
   
   - [ ] `doc-required` 
   
     
   - [x] `doc-not-needed` 
   
     
   - [ ] `doc` 
   
   
   - [ ] `doc-complete`


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