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/03/16 10:47:33 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #14716: fix: consumer epoch may be inconsistent with the broker

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



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -293,6 +293,12 @@ public void redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoc
     }
 
     private synchronized void internalRedeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) {
+
+        if (consumerEpoch > consumer.getConsumerEpoch()) {
+            log.info("set epoch: " + consumerEpoch);

Review comment:
       Should be a debug level log, otherwise, for each redelivery request, the broker will print log here.
   And it's better to provide more information in the log, such as the topic name, the subscription name, the consumer id/name




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