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 2020/07/03 13:24:33 UTC
[GitHub] [pulsar] massakam opened a new pull request #7444: [broker] Consumer is registered on dispatcher even if hash range conflicts on Key_Shared subscription
massakam opened a new pull request #7444:
URL: https://github.com/apache/pulsar/pull/7444
### Motivation
If hash ranges specified by multiple consumers conflict on a Key_Shared subscription, the consumer that connects later will fail to subscribe. When this happens, the consumer that should have failed to subscribe is added to the topic stats. These "non-existent" consumers will not disappear until the broker server is restarted.
When the hash ranges conflict, an exception is thrown from `HashRangeExclusiveStickyKeyConsumerSelector#addConsumer()`. However, at that time, the addition of the consumer to `consumerList` and `consumerSet` of the dispatcher has already been completed, and it will not be removed.
https://github.com/apache/pulsar/blob/1bdfc0dedfba5507dad57af56a3dc56737195383/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java#L94-L96
### Modifications
If an exception is thrown from `HashRangeExclusiveStickyKeyConsumerSelector#addConsumer()`, remove the consumer added to `consumerList` and `consumerSet`.
----------------------------------------------------------------
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
[GitHub] [pulsar] merlimat merged pull request #7444: [broker] Consumer is registered on dispatcher even if hash range conflicts on Key_Shared subscription
Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #7444:
URL: https://github.com/apache/pulsar/pull/7444
----------------------------------------------------------------
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