You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/27 13:08:09 UTC

[GitHub] [pulsar] Technoboy- commented on pull request #16235: [fix][broker] Fix NPE when drop backlog for time limit.

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org