-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Key_Shared consumers with different subscriptions get messages out-of-order in 2.6.0. #7455
Comments
@codelipenghui can you take a look at this issue? |
@codelipenghui @sijie @merlimat Sorry I reported that using consistent hashing makes it not happen but it actually produces inconsistently ordered messages. |
@codelipenghui Here is what is happening.
And, consumers for sub2 consumed messages with key "15" as follows.
You can see that there are two consumers for the key for sub2, and consumer Regarding the behavior, I have several questions.
|
@codelipenghui I'm not sure but as far as I can see the code, |
@feeblefakie could you please give me a broker dump and inconsistency logs like #7455 (comment) when the issue happens? I want to check the details of the |
@codelipenghui Sure. How can I get a broker dump ? |
@codelipenghui I just re-executed it . Here are the logs. You can check the inconsistency with check.sh as needed. (You need to delete Regarding the broker dump, I don't know what you mean/need. Can you clarify ? |
the broker heap dump, I want to check some state of key_shared subscription. |
@codelipenghui @merlimat Could anyone give me the answers for the questions ? I want to dig into it deeper but I'm not very experienced so I need some more information about the spec. @sijie |
@feeblefakie we realized the importance of this issue. @codelipenghui is working on this. please give us some time on fixing this issue since we also have other tasks ongoing. |
@sijie Thank you for the reply. It is great to hear that it is now regarded as important. |
Could you please take a look at this PR #7106 ? I think the above questions we have discussed in #7106 and #6554. And, now looks the problem is #7553 that described, we will review #7553 soon. |
@codelipenghui Thanks. |
@codelipenghui @sijie #7553 seems not the fix for this issue. |
@codelipenghui @sijie Do you have any updates on this? |
@feeblefakie I have pushed a PR #8292, it fixes an ordering issue of the Key_Shared subscription. I'm sure if it can fix this issue. Could you please help double-check? |
It seems that #8292 has solved this problem, let us consider closing this issue. |
Describe the bug
Key_Shared consumers with different subscriptions get messages out-of-order in 2.6.0.
As far as I checked, it doesn't happen with Consistent Hashing approach.Using consistent hashing makes it less likely happen, but it actually still happens when I try the following several times (try 5 times and you can observe it)
To Reproduce
Steps to reproduce the behavior:
https://github.com/feeblefakie/misc/blob/master/pulsar/HOW-TO-REPRODUCE.md
Expected behavior
Key_Shared consumers with different subscriptions should get messages in a consistent order to meet the ordering guarantee of Key_Shared.
Desktop (please complete the following information):
Additional context
I reported the bug in 2.5.0 and it seems fixed by the following PRs, but it is still happening.
http://mail-archives.apache.org/mod_mbox/pulsar-users/202003.mbox/%3CCAPDOW74LN3WtdhpG_cgCCSg9MuMmkNV6giCGD5p%3DW1wWji0W7w%40mail.gmail.com%3E
#6554
#6977
#7106
The text was updated successfully, but these errors were encountered: