Closed lhotari closed 1 month ago
all versions
After the last entry in the hash ring, it wraps around to the first entry: https://github.com/apache/pulsar/blob/7e73967f9daf368562fa0318d4ecb62272d72174/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java#L123-L125
This is ignored in the getConsumerKeyHashRanges method: https://github.com/apache/pulsar/blob/7e73967f9daf368562fa0318d4ecb62272d72174/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java#L138-L145
Another problem is that the rule to pick one consumer when there are hash collisions is also ignored: https://github.com/apache/pulsar/blob/7e73967f9daf368562fa0318d4ecb62272d72174/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java#L127
the results returned by the getConsumerKeyHashRanges should be accurate and correct
the getConsumerKeyHashRanges logic
No response
This will be included in #23327 since the implementation was needed for tests in that PR.
Issue #16654 is related.
Search before asking
Read release policy
Version
all versions
Minimal reproduce step
After the last entry in the hash ring, it wraps around to the first entry: https://github.com/apache/pulsar/blob/7e73967f9daf368562fa0318d4ecb62272d72174/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java#L123-L125
This is ignored in the getConsumerKeyHashRanges method: https://github.com/apache/pulsar/blob/7e73967f9daf368562fa0318d4ecb62272d72174/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java#L138-L145
Another problem is that the rule to pick one consumer when there are hash collisions is also ignored: https://github.com/apache/pulsar/blob/7e73967f9daf368562fa0318d4ecb62272d72174/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java#L127
What did you expect to see?
the results returned by the getConsumerKeyHashRanges should be accurate and correct
What did you see instead?
the getConsumerKeyHashRanges logic
Anything else?
No response
Are you willing to submit a PR?