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
[draft] [fix] [broker] Revert #19446 to fix the send message future never complete #21134
Conversation
apache#19446)" This reverts commit 524288c.
What version of the Java client are you using? The client is supposed to resend all unack'd messages upon creating a new producer. Are you seeing the client resend the messages? |
If you test the producer with an infinite send timeout, do the producers get into a stuck state? If the bug is in the |
It should be
Do you mean the resend by the method ProducerImpl.recoverProcessOpSendMsgFrom?[1] If yes[1], there are two issues: Issues-1: When sent again, the producer is removed by the new broker, for example:
Issues-2: First request timeout and resend are completed at the same time(Maybe this issue exists before #19446):
Then
If hit the |
I am working from my memory here, but I'm pretty sure this is the way it ought to work.
Messages are resent from the
I am not sure that I follow the events listed in this table. What is the purpose of referenced in the table? It's relevant to point out that any time we have a send timeout, it is possible for messages to persist with "holes" and therefore out of order. Also, note that there is synchronization on the |
Is it possible to set up a test to show that this is true? |
After I recheck the code, you are right, it will not be removed in the method
I also think this is a good way to confirm the issue. But it is hard to reproduce. I tend to think you're right, these messages will be re-sent and a response will be received if the time is enough.
ProducerImpl.failPendingMessages will mark all messages as timeout in one lock statement block, so you are right, the scenario above will not occur. |
Thanks for your explanation. I'll sum it up tomorrow. |
Motivation
Before #19446
If producer sending and topic unloading are executed at the same time, there are two scenarios:
After #19446, scenario 2 changed
We received more than
20,000
errors in three hours.Modifications
Revert #19446
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x