codelipenghui commented on a change in pull request #10824:
URL: https://github.com/apache/pulsar/pull/10824#discussion_r645354985



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -532,13 +532,14 @@ protected void sendMessagesToConsumers(ReadType readType, 
List<Entry> entries) {
 
                 EntryBatchSizes batchSizes = 
EntryBatchSizes.get(entriesForThisConsumer.size());
                 EntryBatchIndexesAcks batchIndexesAcks = 
EntryBatchIndexesAcks.get(entriesForThisConsumer.size());
-                filterEntriesForConsumer(Optional.ofNullable(entryWrappers), 
entriesForThisConsumer, batchSizes,
-                        sendMessageInfo, batchIndexesAcks, cursor, readType == 
ReadType.Replay);
+                filterEntriesForConsumer(Optional.ofNullable(entryWrappers), 
start, entriesForThisConsumer,
+                        batchSizes, sendMessageInfo, batchIndexesAcks, cursor, 
readType == ReadType.Replay);
 
                 c.sendMessages(entriesForThisConsumer, batchSizes, 
batchIndexesAcks, sendMessageInfo.getTotalMessages(),
                         sendMessageInfo.getTotalBytes(), 
sendMessageInfo.getTotalChunkedMessages(), redeliveryTracker);
 
                 int msgSent = sendMessageInfo.getTotalMessages();
+                totalMessages -= msgSent;

Review comment:
       Because the consume will ignore the acked index.

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -532,13 +532,14 @@ protected void sendMessagesToConsumers(ReadType readType, 
List<Entry> entries) {
 
                 EntryBatchSizes batchSizes = 
EntryBatchSizes.get(entriesForThisConsumer.size());
                 EntryBatchIndexesAcks batchIndexesAcks = 
EntryBatchIndexesAcks.get(entriesForThisConsumer.size());
-                filterEntriesForConsumer(Optional.ofNullable(entryWrappers), 
entriesForThisConsumer, batchSizes,
-                        sendMessageInfo, batchIndexesAcks, cursor, readType == 
ReadType.Replay);
+                filterEntriesForConsumer(Optional.ofNullable(entryWrappers), 
start, entriesForThisConsumer,
+                        batchSizes, sendMessageInfo, batchIndexesAcks, cursor, 
readType == ReadType.Replay);
 
                 c.sendMessages(entriesForThisConsumer, batchSizes, 
batchIndexesAcks, sendMessageInfo.getTotalMessages(),
                         sendMessageInfo.getTotalBytes(), 
sendMessageInfo.getTotalChunkedMessages(), redeliveryTracker);
 
                 int msgSent = sendMessageInfo.getTotalMessages();
+                totalMessages -= msgSent;

Review comment:
       change to remainingMessages




-- 
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]


Reply via email to