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 2021/04/01 01:45:43 UTC

[GitHub] [pulsar] baomingyu commented on a change in pull request #10096: fix 8115 Some partitions get stuck after adding additional consumers to the KEY_SHARED subscriptions

baomingyu commented on a change in pull request #10096:
URL: https://github.com/apache/pulsar/pull/10096#discussion_r605324160



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
##########
@@ -260,6 +266,8 @@ protected void sendMessagesToConsumers(ReadType readType, List<Entry> entries) {
             // readMoreEntries should run regardless whether or not stuck is caused by
             // stuckConsumers for avoid stopping dispatch.
             readMoreEntries();
+        }  else if (currentThreadKeyNumber == 0) {

Review comment:
       When messagesForC is 0, consumer.sendMessages() will not be called,  So keyNumbers can not be update in the async callback of the consumer.sendMessages();   And keyNumbers.decrementAndGet() == 0 may be not true here.
   
   I add logs in 'else if (currentThreadKeyNumber == 0) ', log is printed sometimes.  




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