Skip to content

[fix][txn] fix the consumer stuck due to deduplicated messages in pending ack state - #21177

Merged
Technoboy- merged 2 commits into
apache:masterfrom
hrzzzz:dev-ruihongzhou-3
Sep 27, 2023
Merged

[fix][txn] fix the consumer stuck due to deduplicated messages in pending ack state#21177
Technoboy- merged 2 commits into
apache:masterfrom
hrzzzz:dev-ruihongzhou-3

Conversation

@hrzzzz

@hrzzzz hrzzzz commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

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

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: hrzzzz#2

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 14, 2023
@hrzzzz hrzzzz closed this Sep 14, 2023
@hrzzzz hrzzzz reopened this Sep 14, 2023
@hrzzzz

hrzzzz commented Sep 18, 2023

Copy link
Copy Markdown
Contributor Author

@congbobo184 @aloyszhang PTAL

@congbobo184 congbobo184 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@hrzzzz

hrzzzz commented Sep 25, 2023

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@Technoboy- Technoboy- modified the milestones: 3.1.0, 3.2.0 Sep 26, 2023
@Technoboy-
Technoboy- merged commit 0b32b17 into apache:master Sep 27, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants