sijie commented on a change in pull request #4062: Delayed message delivery
implementation
URL: https://github.com/apache/pulsar/pull/4062#discussion_r277192819
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -429,11 +440,12 @@ public synchronized void readEntriesComplete(List<Entry>
entries, Object ctx) {
// remove positions first from replay list first :
sendMessages recycles entries
if (readType == ReadType.Replay) {
entries.subList(start, start + messagesForC).forEach(entry
-> {
- messagesToReplay.remove(entry.getLedgerId(),
entry.getEntryId());
+ messagesToRedeliver.remove(entry.getLedgerId(),
entry.getEntryId());
});
}
- SendMessageInfo sentMsgInfo =
c.sendMessages(entries.subList(start, start + messagesForC));
+ SendMessageInfo sentMsgInfo = c
+ .sendMessages(new ArrayList<>(entries.subList(start,
start + messagesForC)));
Review comment:
can you explain why you are constructing a new array list?
----------------------------------------------------------------
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]
With regards,
Apache Git Services