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:49:24 UTC

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

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



##########
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:
       Thanks, fixed.

##########
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:
       Thanks, fixed.




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