-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fixbug] [broker] filter messages in pending ack state. #19451
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
[fixbug] [broker] filter messages in pending ack state. #19451
Conversation
|
PTAL, thanks. @congbobo184 |
congbobo184
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There have some problem:
- use Exclusive, why not use cumulative ack?
- only check the postion, how batch message can be redeliver?
I don't think it's necessary to fix it, at least for now
|
exclusive redeliver messages from the cursor markdelete
message dispatch is in order, if messages can be filtered, consumers using cumulative ack with txn will lose the messages which have been filtered. |
|
the problem described in this pr have been fixed in #19581, so i close this pr. |
Motivation
Currently, broker do not filter messages in pending ack state when dispatching messages to client. If messages in pending ack state are delivered to client,
PulsarClientException$TransactionConflictExceptionwill be throwed.PR #14327 has tried to fix one of cases that broker will dispatch messages in pending ack state.
But, there are other cases that will trigger this problem.
For example, if producer send non batch messages, msg1 and msg2. consumer use txn1 ack msg1, use txn2 ack msg2.
then consumer abort txn2, at this time, we should redeliver only msg2. Because msg1 is in pending ack state.
Modifications
filter non batch messages in pending ack state.
Verifying this change
(Please pick either of the following options)
This change added tests and can be verified.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: thetumbled#13