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:
[email protected]