-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]Fast return if ack cumulative illegal #15695
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
Conversation
|
/pulsarbot run-failure-checks |
codelipenghui
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.
The change looks good. Could you please help add a test?
For the changes of line:382, it should be a bug fix and the behavior changed?
Before this change, if cumulative ack happened on a Shared subscription, the ack will take effect, but after this change, the ack will not take effect if the request with only one ack.
Lines 373 to 383 in e2fa189
| if (positions.size() != 1) { | |
| log.warn("[{}][{}] Invalid cumulative ack received with multiple message ids.", topicName, subName); | |
| return; | |
| } | |
| Position position = positions.get(0); | |
| if (log.isDebugEnabled()) { | |
| log.debug("[{}][{}] Cumulative ack on {}", topicName, subName, position); | |
| } | |
| cursor.asyncMarkDelete(position, mergeCursorProperties(properties), | |
| markDeleteCallback, previousMarkDeletePosition); |
|
Add UT, PTAL @codelipenghui |
a6891ed to
e94f1fd
Compare
|
/pulsarbot run-failure-checks |
2 similar comments
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
(cherry picked from commit 02dca31)
(cherry picked from commit 02dca31)
Motivation
CommandAckModifications
ack.getMessageIdsCount() != 1orSubscription.isIndividualAckMode(subType)Verifying this change
org.apache.pulsar.broker.service.MessageCumulativeAckTestDocumentation
no-need-doc