Skip to content

Fix documentation for RETRIES_DOC on version 3.2#15413

Closed
federico-weisse-sportsbet wants to merge 1 commit intoapache:3.2from
federico-weisse-sportsbet:bugfix/fix-RETRIES_DOC-for32
Closed

Fix documentation for RETRIES_DOC on version 3.2#15413
federico-weisse-sportsbet wants to merge 1 commit intoapache:3.2from
federico-weisse-sportsbet:bugfix/fix-RETRIES_DOC-for32

Conversation

@federico-weisse-sportsbet
Copy link
Copy Markdown

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)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

+ " 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"
Copy link
Copy Markdown
Member

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 :)

Copy link
Copy Markdown
Author

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?

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for info!

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown
Author

@federico-weisse-sportsbet federico-weisse-sportsbet Feb 23, 2024

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

Copy link
Copy Markdown
Member

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

@jolshan
Copy link
Copy Markdown
Member

jolshan commented Feb 28, 2024

@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.

@federico-weisse-sportsbet
Copy link
Copy Markdown
Author

Has been corrected for new versions on this PR.

However, from version 3.1 to 3.4, the documentation must still be corrected.
See KAFKA-16300

@jolshan
Copy link
Copy Markdown
Member

jolshan commented Mar 7, 2024

@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.

@federico-weisse-sportsbet
Copy link
Copy Markdown
Author

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

@kamalcph
Copy link
Copy Markdown
Contributor

kamalcph commented Mar 9, 2024

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2024

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.

@github-actions github-actions Bot added the stale Stale PRs label Jun 8, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 5, 2025

This PR has been closed since it has not had any activity in 120 days. If you feel like this
was a mistake, or you would like to continue working on it, please feel free to re-open the
PR and ask for a review.

@github-actions github-actions Bot added the closed-stale PRs that were closed due to inactivity label Jan 5, 2025
@github-actions github-actions Bot closed this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed-stale PRs that were closed due to inactivity stale Stale PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants