-
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][broker] Introduce the last sent position to fix message ordering issues in Key_Shared (PIP-282) #21953
Conversation
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.
LGTM
(In our-company we cherry-picked this change and so far no issues have been identified. However, it is better if you could give it another review for further validation.)
LGTM |
/pulsarbot rerun-failure-checks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21953 +/- ##
============================================
+ Coverage 73.57% 73.90% +0.33%
- Complexity 32624 33094 +470
============================================
Files 1877 1885 +8
Lines 139502 140522 +1020
Branches 15299 15466 +167
============================================
+ Hits 102638 103857 +1219
+ Misses 28908 28616 -292
- Partials 7956 8049 +93
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@equanz Sorry for the late review, I will finish the review tomorrow. |
Hi @poorbarcode. |
Sorry, I am busy for other things before, I will done this review soon |
.../apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Show resolved
Hide resolved
.../apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Show resolved
Hide resolved
.../apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Show resolved
Hide resolved
.../apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Show resolved
Hide resolved
43a2dc3
to
c3b318a
Compare
Rebased to fix conflicts. |
.../apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Show resolved
Hide resolved
.../apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Outdated
Show resolved
Hide resolved
@codelipenghui Could you take a look? |
Looking forward to your reviews. |
@equanz @poorbarcode Sorry for the late response, I will review this week. |
Hi @codelipenghui . Do you have any comments? |
Sorry, I'm struggling in other tasks. Please go ahead to merge the PR. @poorbarcode |
@equanz Could you please handle the conflicts? |
c3b318a
to
8b427b3
Compare
/pulsarbot rerun-failure-checks |
@poorbarcode Addressed. PTAL |
@poorbarcode Could you take a look? |
@equanz do you have a chance to update the documentation in https://pulsar.apache.org/docs/next/concepts-messaging/#preserving-order-of-processing to reflect the PIP-282 changes? |
I forgot it. I'll fix it. |
Here is a fix of the docs. |
…g issues in Key_Shared (PIP-282) (apache#21953)
PIP: #20776
Motivation
Key_Shared has a mechanism called the "recently joined consumers" to keep message ordering.
However, currently, it doesn't care about some corner cases.
More specifically, we found two out-of-order issues cased by:
We should care about these cases in Key_Shared subscription.
(For more details, please see the PIP document.)
Modifications
readPositionWhenJoining
tolastSentPositionWhenJoining
.(For more details, please see the PIP document.)
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
Lines 1281 to 1288 in 43a2dc3
pulsar/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/ConsumerStats.java
Lines 72 to 73 in 43a2dc3
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: equanz#6