AnonHxy commented on code in PR #21856:
URL: https://github.com/apache/pulsar/pull/21856#discussion_r1444008763
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java:
##########
@@ -191,7 +191,7 @@ public RedeliveryTracker getRedeliveryTracker() {
}
@Override
- public void sendMessages(List<Entry> entries) {
+ public synchronized void sendMessages(List<Entry> entries) {
Review Comment:
I think let `getNextConsumer()` synchronized is enough:)
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java:
##########
@@ -191,7 +191,7 @@ public RedeliveryTracker getRedeliveryTracker() {
}
@Override
- public void sendMessages(List<Entry> entries) {
+ public synchronized void sendMessages(List<Entry> entries) {
Review Comment:
I think let `getNextConsumer()` be synchronized is enough:)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]