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 2021/12/09 21:14:52 UTC

[GitHub] [pulsar] michaeljmarshall opened a new pull request #13222: [Broker] Optimize ManagedLedger Ledger Ownership Check

michaeljmarshall opened a new pull request #13222:
URL: https://github.com/apache/pulsar/pull/13222


   ### Motivation
   
   The logic added in https://github.com/apache/pulsar/pull/11912 forces all reads to check for containment in the managed ledger's collection of ledgers. Since the current ledger is always a member of the managed ledger's collection of ledgers, we can add a slight optimization that skips this check when reading from the current ledger.
   
   ### Modifications
   
   * Update the ordering of conditional logic in `ManagedLedger#asyncReadEntry`. 
   
   ### Verifying this change
   
   The test added in https://github.com/apache/pulsar/pull/11912 still passes, so this has the correct logic.
   
   ### Does this pull request potentially affect one of the following parts:
   
   This is not a breaking change.
   
   ### Documentation
   
   - [x] `no-need-doc` 
   


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