Describe the bug
When I run pulsar-admin topics stats TOPIC-NAME and I have a KeyShared subscription with stickyHashRanges, with many ranges, the stats are not fully reporting the ranges, it looks like that for each consumer they report only the last set of ranges assigned to each Consumer and for some Consumers the list is empty even if the Consumer set the range and it is actually consuming messages.
Original Issue: apache/pulsar#14073
Describe the bug When I run
pulsar-admin topics stats TOPIC-NAME
and I have a KeyShared subscription with stickyHashRanges, with many ranges, the stats are not fully reporting the ranges, it looks like that for each consumer they report only the last set of ranges assigned to each Consumer and for some Consumers the list is empty even if the Consumer set the range and it is actually consuming messages.There should be some bug here: https://github.com/apache/pulsar/blob/9abd6d30f39f74e255cd5dac40b77af3dce5c468/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeExclusiveStickyKeyConsumerSelector.java#L69
Additional context Pulsar 2.8.2