-
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][client] Messages with inconsistent consumer epochs are not filtered when using batch receive and trigger timeout. #17318
Conversation
/pulsarbot run-failure-checks |
a95e5a2
to
3912b48
Compare
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Show resolved
Hide resolved
3912b48
to
b4e7a52
Compare
@nodece Thanks, all comments fixed, PTAL. |
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
@congbobo184 Do you remember why the consumer epoch check happened after polling the messages from the receiver queue? @shibd @congbobo184 pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java Lines 1271 to 1285 in 69f3f74
It looks like if the message with invalid epoch, we don't need to add it to the receiver queue. pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java Lines 1628 to 1644 in 69f3f74
The messages with invalid epoch should be the skipped messages like here pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java Line 1559 in 69f3f74
It also makes sense to add skipped messages in |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/util/NoOpLock.java
Outdated
Show resolved
Hide resolved
a51f891
to
ad81e5a
Compare
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageRedeliveryTracker.java
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageRedeliveryTracker.java
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageRedeliveryTracker.java
Show resolved
Hide resolved
a2a73be
to
2d8c1e6
Compare
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.
Looks good to me.
@shibd I have left some minor comment, PTAL.
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/api/MultiTopicsConsumerTest.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/api/MultiTopicsConsumerTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
…not filtered when using batch receive and trigger timeout. (apache#17318)" This reverts commit 12e78b2.
Motivation
Messages with inconsistent consumer epochs are not filtered when using batch receive and trigger timeout.
Modifications
notifyPendingBatchReceivedCallBack
.notifyPendingBatchReceivedCallBack
logic.Verifying this change
testBatchReceiveRedeliveryAddEpoch
unit test covers the scene.Documentation
doc-not-needed
Matching PR in forked repository
shibd#16