-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Fix documentation for RETRIES_DOC on version 3.2 #15413
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
Closed
federico-weisse-sportsbet
wants to merge
1
commit into
apache:3.2
from
federico-weisse-sportsbet:bugfix/fix-RETRIES_DOC-for32
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 comment with your correction is correct -- retries can reorder records when idempotency is not enabled and in flight requests > 1.
However, there are also some edge cases where even one inflight request could see duplicates or re-ordering when multiple connections are involved (this is due to tcp level interactions). I'm not sure if that was ever the intention of this document but it was something that came up recently and is problem not well known.
Moral of the story is that only idempotency promises no duplicates or reordering :)
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.
Good to know, thanks for the info, could you provide more info on when a re-ordering (not so interested on duplicates for my use case) can happen, if there is a really unlikely edge case we may live with it.
On the other hand, do you have an idea of how slow is using using idempotency vs in flight requests =1?
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.
In the case where a connection is closed on the client side, it can still arrive later on the server. Even though the client disconnects and resumes with a new connection, a message from the old connection can come in out of order. This can happen when there is a temporary network issue.
I don't have metrics on latency comparisons with idempotency vs infligh requests = 1, but I wouldnt suspect it should be too much. Idempotency involves a sequence check broker side which shouldn't take too much time per produce request. It would be an interesting test to do.
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.
Cool, thanks for info!
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.
Not sure if we wanted to include a note about this or not. Just something like noting that inflight requests = 1 does not guarantee idempotency due to how TCP connections work with Kafka.
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.
Yes, I guess that if that is the case the whole comment is a little outdated, since no matter inflight requests value but just idempotency to guarantee partition ordering, not for me to decide about this, but I think that this point should be clear as ordering is an important feature of kafka partitions.
Uh oh!
There was an error while loading. Please reload this page.
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.
In any case reconsidering the case of the connection closed on client side, if inflight = 1, it should send one batch at a time, so, I wonder if that case is no more about duplicated messages than re-ordering.
I guess the only way to have an un-orderer is if the broker gets first new connection batches, like
new_conn_batch1, new_conn_batch2, old_conn_batch1
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.
Yeah something along the lines of that