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/02 02:16:10 UTC

[GitHub] [pulsar] Technoboy- commented on a change in pull request #14501: Add log to track negtive unacked msg.

Technoboy- commented on a change in pull request #14501:
URL: https://github.com/apache/pulsar/pull/14501#discussion_r817292622



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java
##########
@@ -947,6 +949,10 @@ private int addAndGetUnAckedMsgs(Consumer consumer, int ackedMessages) {
             subscription.addUnAckedMessages(ackedMessages);
             unackedMsgs = UNACKED_MESSAGES_UPDATER.addAndGet(consumer, ackedMessages);
         }
+        if (unackedMsgs < 0 && System.currentTimeMillis() - negtiveUnackedMsgsTimestamp >= 10_000) {

Review comment:
       yes, in #14246, if there is a bug, the unackedMsgs is negative, there will print a lot of logs, this may confuse users.
   So it's better to print at a period of 10s. 




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