[fix][txn] fix the consumer stuck due to deduplicated messages in pending ack state - #21177
Merged
Conversation
Contributor
Author
|
@congbobo184 @aloyszhang PTAL |
congbobo184
approved these changes
Sep 20, 2023
hrzzzz
force-pushed
the
dev-ruihongzhou-3
branch
from
September 21, 2023 06:30
39c355b to
a97446e
Compare
liangyepianzhou
approved these changes
Sep 22, 2023
poorbarcode
approved these changes
Sep 22, 2023
Contributor
Author
|
/pulsarbot rerun-failure-checks |
Technoboy-
pushed a commit
that referenced
this pull request
Sep 27, 2023
Technoboy-
pushed a commit
that referenced
this pull request
Sep 27, 2023
liangyuanpeng
pushed a commit
to liangyuanpeng/pulsar
that referenced
this pull request
Oct 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#19581 filter messages in dispatcher. However, it filters out duplicate messages after calculating
totalMessages, which results in occupying permits even though the messages were not sent to the consumer. This could potentially cause the consumer to be stuck and unable to consume.Modifications
Calculate totalMessages after filtering out the messages.
Verifying this change
Make sure that the change passes the CI checks.
Added test in
org.apache.pulsar.client.impl.TransactionEndToEndTest#testMsgsInPendingAckStateWouldNotGetTheConsumerStuckDocumentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: hrzzzz#2