This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 12f9e43190b [fix][broker]Fix NonPersistentDispatcherMultipleConsumers
ArrayIndexOutOfBoundsException (#21856)
12f9e43190b is described below
commit 12f9e43190bc214e6339ce39db0f0e35b9d54a2d
Author: Jiwei Guo <[email protected]>
AuthorDate: Mon Jan 8 09:19:41 2024 +0800
[fix][broker]Fix NonPersistentDispatcherMultipleConsumers
ArrayIndexOutOfBoundsException (#21856)
---
.../service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java
index c106b1603f6..bfb7785a4f5 100644
---
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java
+++
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java
@@ -184,7 +184,7 @@ public class NonPersistentDispatcherMultipleConsumers
extends AbstractDispatcher
}
@Override
- public void sendMessages(List<Entry> entries) {
+ public synchronized void sendMessages(List<Entry> entries) {
Consumer consumer = TOTAL_AVAILABLE_PERMITS_UPDATER.get(this) > 0 ?
getNextConsumer() : null;
if (consumer != null) {
SendMessageInfo sendMessageInfo = SendMessageInfo.getThreadLocal();