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

   <!--
   ### Contribution Checklist
     
     - PR title format should be *[type][component] summary*. For details, see 
*[Guideline - Pulsar PR Naming 
Convention](https://pulsar.apache.org/contribute/develop-semantic-title/)*. 
   
     - Fill out the template below to describe the changes contributed by the 
pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from 
multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and 
this checklist, leaving only the filled out template below.
   -->
   
   ### Motivation
   
   When I read source code about "send duplicate read to BK", I found it's not 
concurrent. 
   Firstly, it would be more efficently if it's concurrrent. Secondly, it may 
still send duplicate read to BK.
   For example:
   
   1. first  read  [10, 20]
   2. second read [30, 40]
   3. third read [10, 40]
   
   For the third read will split to [10,20], [21, 29], [30, 40]. The three 
reads will be perform sequencelly. If [30, 40] pending reads is done before 
[10, 20] , there will be another [30, 40] read send to BookKeeper. 
   
   
   <!-- Explain here the context, and why you're making that change. What is 
the problem you're trying to solve. -->
   
   ### Modifications
   
   I have add three futures in 
`org.apache.bookkeeper.mledger.impl.cache.PendingReadsManager.PendingRead#readEntriesComplete`.
 Each future
   will read a  range of entry concurrently. At last aggregate all the results 
of future.
   
   However, I'm not sure whether realease entry is neccessary. For example, one 
of three future occurred exception, should 
    we release the entry of the other two future?
   
   ### Verifying this change
   
   - [ X] Make sure that the change passes the CI checks.
   
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [X] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   


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