Technoboy- commented on PR #16235:
URL: https://github.com/apache/pulsar/pull/16235#issuecomment-1167331533

   > Is it able to add a test?
   > 
   > Maybe try to mock the managed ledger and let the `mLedger.getLedgerInfo` 
method return null.
   
   Really. it's hard to add a test. because there existed a race condition with 
PersistentTopic#slowestReaderTimeBasedBacklogQuotaCheck, see #15663.
   When broker do `monitorBacklogQuota `, it will first execute 
PersistentTopic#slowestReaderTimeBasedBacklogQuotaCheck, it will check the 
`mLedger.getLedgerInfo`. then to BacklogQuotaManager#dropBacklogForTimeLimit. 
we need to mock after PersistentTopic#slowestReaderTimeBasedBacklogQuotaCheck.
   
   It's the same issue with #15663, so using the same resolution for this issue.
   


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