Fix documentation for RETRIES_DOC on version 3.2#15413
Fix documentation for RETRIES_DOC on version 3.2#15413federico-weisse-sportsbet wants to merge 1 commit intoapache:3.2from
Conversation
| + " If conflicting configurations are set and idempotence is not explicitly enabled, idempotence is disabled." | ||
| + "<p>" | ||
| + "Allowing retries while setting <code>enable.idempotence</code> to <code>false</code> and <code>" + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + "</code> to 1 will potentially change the" | ||
| + "Allowing retries while setting <code>enable.idempotence</code> to <code>false</code> and <code>" + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + "</code> to greater than 1 will potentially change the" |
There was a problem hiding this comment.
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.
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.
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.
Cool, thanks for info!
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
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.
Yeah something along the lines of that
|
@federico-weisse-sportsbet Is there a reason we targeted 3.2? Is this not a problem in future releases? We don't usually change aspects this far back since we likely won't release another 3.2 version. |
|
Has been corrected for new versions on this PR. However, from version 3.1 to 3.4, the documentation must still be corrected. |
|
@federico-weisse-sportsbet I see. We can update this branches but they may not be released again. If this is a concern for the website to have correct documentation it might be worth updating there as well. |
|
Yeah, totally; I think the important thing is correcting the documentation, as people may be confused while reading it. Still, I don't know where the documentation is. Is it a separate repo? I thought that was generated from code |
Yes, the documentation are maintained in a separate repo: https://github.com/apache/kafka-site |
|
This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has merge conflicts, please update it with the latest from trunk (or appropriate release branch) If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. |
|
This PR has been closed since it has not had any activity in 120 days. If you feel like this |
This should be greater than 1 to be consistent with behavior described in max.in.flight.requests.per.connection property.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Fix the same as #13115 in version 3.2
Committer Checklist (excluded from commit message)