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

   Fixes #23443
   
   ### Motivation
   
   In the current ConsistentHashingStickyKeyConsumerSelector implementation, 
when there's a hash ring point collision,
   the original entry will be preserved and the attempted addition will be 
rejected.
   This isn't a problem with the consumerNameIndexTracker solution since the 
collisions won't align for all hash ring points when using the same consumer 
name. Because of this, collisions won't affect the overall distribution 
significantly when the number of hash ring points is sufficiently large (>100).
   
   However, when the "selected" consumer is removed, the colliding consumer 
should be selected and take over it's hash ring point. This PR implements that 
logic.
   
   ### Modifications
   
   - add HashRingPointEntry which holds the selected consumer and the colliding 
consumers
   - add logic for adding and removing to handle the colliding consumers in the 
designed way.
   - add test coverage
     - replace previous test that had too strict expectations.
   - add methods to range classes to be used in tests
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `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