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 2019/03/02 04:41:40 UTC

[GitHub] rdhabalia opened a new pull request #3732: [pulsar-broker] Optimize message replay for large backlog consumer

rdhabalia opened a new pull request #3732: [pulsar-broker] Optimize message replay for large backlog consumer
URL: https://github.com/apache/pulsar/pull/3732
 
 
   ### Motivation
   It address #3731.  
   
   ### Modification
   - Introduce `ConcurrentSortedLongPairSet` that helps broker to avoid random read across multiple managed-ledgers. It still uses `ConcurrentLongPairSet` to avoid object allocation for message-ids.
   - introduce `<T> Set<T> items(int numberOfItems, BiFunction<Long, Long, T> longPairConverter)` method  in `LongPairSet` to avoid creating temporary [LongPair](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java#L291) objects.
   - this change will not impact to normal usecase where topic doesn't have backlog and doesn't have many active managed-ledgers.
   
   ### Note
   I have done performance testing on `GrowablePriorityLongPairQueue` which I had introduced sometime back but its insert/remove is super slow and CPU intensive so, we can't use it in this scenario.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services