Skip to content
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

KAFKA-15859: Add timeout field to the ListOffsets request #17112

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

kamalcph
Copy link
Collaborator

@kamalcph kamalcph commented Sep 6, 2024

This is the part-3 of the KIP-1075

Added a timeoutMs field to the ListOffsets request. This timeout is applicable only for the topic/partitions that are enabled with remote storage.

When the timeout is defined in the request, then we use it to define the delay timeout for DelayedRemoteListOffsets request. When the timeout is not defined (requests from older client), then we take the dynamic remote.list.offsets.request.timeout.ms server config as the timeout.

Consumer and Admin client behavior are different. Consumer retries the LIST_OFFSETS request in-case of an error but not the AdminClient. And, consumer timeouts the request, if the response exceeds request.timeout.ms, whereas, AdminClient timeouts the request when it exceeds the default.api.timeout.ms.

To retain the same behavior, we are passing the requestTimeoutMs as timeout from the consumer and defaultApiTimeout / overwritten ListOffsetsOption timeout from the admin.

Committer Checklist (excluded from commit message)

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

@kamalcph kamalcph added the tiered-storage Related to the Tiered Storage feature label Sep 6, 2024
@kamalcph
Copy link
Collaborator Author

kamalcph commented Sep 6, 2024

This PR is not dependent on #16602 and can be reviewed separately. PTAL.

"validVersions": "0-9",
//
// Version 10 enables async remote list offsets support (KIP-1075)
"validVersions": "0-10",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

since we have flexible versions from v6, is it required to bump the version to 10?

@kamalcph
Copy link
Collaborator Author

This is the final part-3 of KIP-1075. The PR is ready for review. PTAL. Thanks!

Copy link
Member

@satishd satishd left a comment

Choose a reason for hiding this comment

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

Thanks @kamalcph for the PR, left a minor comment.

]}
]},
{ "name": "TimeoutMs", "type": "int32", "versions": "10+",
"about": "The timeout to await a response in milliseconds for remote requests." }
Copy link
Member

Choose a reason for hiding this comment

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

You can update the doc with more details like below.

"The timeout to await a response in milliseconds for the requests that require reading from remote storage for topics that are enabled with tiered storage."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tiered-storage Related to the Tiered Storage feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants