codelipenghui commented on a change in pull request #10096:
URL: https://github.com/apache/pulsar/pull/10096#discussion_r604988191
##########
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:
And there is a race condition when check currentThreadKeyNumber == 0
here since we are updating the keyNumbers in the async callback of the
`consumer.sendMessages()`;
--
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]