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 2022/03/10 19:48:28 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #14641: fix: fix ArrayIndexOutOfBoundsException when concurrent

eolivelli commented on a change in pull request #14641:
URL: https://github.com/apache/pulsar/pull/14641#discussion_r824098253



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java
##########
@@ -119,17 +119,13 @@ public Consumer getNextConsumer() {
             return null;
         }
 
-        if (currentConsumerRoundRobinIndex >= consumerList.size()) {

Review comment:
       About about changing this variable to AtomicInteger and use here 'compute' to increase the value and reset it atomically?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org