equanz commented on code in PR #23447:
URL: https://github.com/apache/pulsar/pull/23447#discussion_r1798839659


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java:
##########
@@ -147,9 +208,15 @@ public Optional<ImpactedConsumersResult> 
removeConsumer(Consumer consumer) {
                 // Remove all the points that were added for this consumer
                 for (int i = 0; i < numberOfPoints; i++) {
                     int hash = calculateHashForConsumerAndIndex(consumer, 
consumerNameIndex, i);
-                    if (hashRing.remove(hash, consumerIdentityWrapper)) {
-                        
consumerNameIndexTracker.decreaseConsumerRefCount(consumerIdentityWrapper);
-                    }
+                    hashRing.compute(hash, (k, hashRingPointEntry) -> {
+                        assert hashRingPointEntry != null : "hash ring entry 
wasn't found for hash " + hash;

Review Comment:
   I understood that it was for testing.



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