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/11/11 04:14:25 UTC
[GitHub] [pulsar] codelipenghui commented on a diff in pull request #18407: [fix][broker]Fix failover/exclusive consumer cumulate ack not remove msg from UnAckedMessageTracker
codelipenghui commented on code in PR #18407:
URL: https://github.com/apache/pulsar/pull/18407#discussion_r1019816825
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java:
##########
@@ -458,7 +458,8 @@ protected CompletableFuture<Void> doAcknowledge(MessageId messageId, AckType ack
Consumer individualConsumer = consumers.get(topicMessageId.getTopicPartitionName());
if (individualConsumer != null) {
MessageId innerId = topicMessageId.getInnerMessageId();
- return individualConsumer.acknowledgeCumulativeAsync(innerId);
+ return individualConsumer.acknowledgeCumulativeAsync(innerId)
+ .thenAccept(__ -> unAckedMessageTracker.removeMessagesTill(topicMessageId));
Review Comment:
The `unAckedMessageTracker` will have the message IDs from all partitions. If we use `removeMessagesTill` here, the message acknowledgment for partition-0 will also remove the message IDs of other partitions, right?
--
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