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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to