-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][broker] fix broker unackmessages become a negative number #17003
[fix][broker] fix broker unackmessages become a negative number #17003
Conversation
@congbobo184 Would it be possible to describe the impact of the bug that was fixed by this PR? The current description describes implementation level details of the issue. However, most Pulsar users don't understand the implementation level, and therefore it would be useful if the externally observable behavior could be explained. |
Hi, @congbobo184 |
(cherry picked from commit 5262e6c)
(cherry picked from commit 5262e6c)
@lhotari This PR fixes some cases where consumer unackedCount may become a negative number. |
) (cherry picked from commit 5262e6c)
Just explain the issue that the current PR fixed
|
This PR fixes some cases where consumer unackedCount may become a negative number.
issue: reduce the consumer
unackedCount
use incorrect consumer.reproduce step
in current code the
getUnackedMessages = 2
Motivation
get the correct consumer and reduce the correct un acked messages
Modifications
change the method
getAckedCountForBatchIndexLevelEnabled
use ownerConsumer to check the pendingAck messagesVerifying this change
add the test
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Does this pull request introduce a new feature? (yes)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
doc-not-needed